sample-size-power-calculator
Advanced sample size and power calculations for complex study designs including survival analysis, clustered designs, and multiple comparisons.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aipoch-ai/sample-size-power-calculatorWhat This Skill Does
The sample-size-power-calculator is a high-precision computational agent designed to support researchers, data scientists, and academics in conducting rigorous power analysis for complex study designs. Unlike basic calculators, this tool handles advanced statistical paradigms, including survival analysis (e.g., Cox proportional hazards models), clustered and hierarchical study designs (including intraclass correlation coefficients), and corrections for multiple hypothesis testing (such as Bonferroni or False Discovery Rate adjustments). It acts as a bridge between abstract research protocols and actionable, reproducible statistical requirements, ensuring that study parameters are robust before data collection begins.
Installation
To integrate this skill into your environment, use the OpenClaw command-line interface. Ensure your local environment is configured with Python 3.10 or higher. Execute the following in your terminal:
clawhub install openclaw/skills/skills/aipoch-ai/sample-size-power-calculator
Once installed, verify the installation by checking the parsing of the primary entry point: python -m py_compile scripts/main.py
Use Cases
- Clinical Trial Planning: Determining the necessary patient cohort size for survival analysis to achieve 80% power at a 0.05 significance level, accounting for anticipated drop-out rates.
- Clustered Research Designs: Estimating power for group-randomized trials where subjects are nested within schools or hospitals, requiring adjustments for clustering effects.
- Multiple Comparison Correction: Calculating the required sample size for experiments involving large-scale genomic or multi-omic datasets where controlling the Family-Wise Error Rate is essential.
- Grant Writing: Providing reproducible, audit-ready documentation for 'Power and Sample Size' sections in grant applications, detailing exact assumptions and statistical thresholds.
Example Prompts
- "Calculate the required sample size for a survival analysis study with a hazard ratio of 0.75, an alpha of 0.05, and 90% power, assuming a 24-month recruitment period and 12-month follow-up."
- "Perform a power analysis for a cluster-randomized trial with 10 clusters per arm and an intraclass correlation coefficient (ICC) of 0.05. We need to detect a standardized mean difference of 0.4."
- "Evaluate the impact on study power when applying a Benjamini-Hochberg correction for 50 simultaneous hypothesis tests in our current pilot study parameters."
Tips & Limitations
- Documentation is Key: Always document the specific assumptions (e.g., effect size, variance) in your research notes. The script is deterministic, meaning it provides outputs based strictly on your inputs.
- Scope Sensitivity: This tool is intended for complex designs; for simple t-tests, consider if this is the most efficient path.
- Data Validation: Always cross-reference the output with the theoretical guidance found in the
references/directory. If the script returns an error, check that your input thresholds are mathematically valid for the chosen distribution model.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aipoch-ai-sample-size-power-calculator": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
mechanism-flowchart
Generates Mermaid flowchart code and visual diagrams for pathophysiological.
reference-style-sync
One-click synchronization and standardization of reference formats in literature management tools, intelligently fixing metadata errors.
clinical-data-cleaner
Use when cleaning clinical trial data, preparing data for FDA/EMA submission, standardizing SDTM datasets, handling missing values in clinical studies, detecting outliers in lab results, or converting raw CRF data to CDISC format. Cleans and standardizes clinical trial data for regulatory compliance with audit trails.
metagenomic-krona-chart
Analyze data with `metagenomic-krona-chart` using a reproducible workflow, explicit validation, and structured outputs for review-ready interpretation.
anatomy-quiz-master
Generate interactive anatomy quizzes for medical education with multiple question types, difficulty levels, and anatomical regions. Supports gross anatomy, neuroanatomy, and clinical correlations for self-assessment and exam preparation.