power-analysis

Calculate power and sample size for two-arm and clustered RCTs.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/fredmilhome/laffer_tobacco --skill power-analysis-fredmilhome
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: power-analysis
Source: https://github.com/fredmilhome/laffer_tobacco/tree/main/.claude/skills/power-analysis
Command: npx skills add https://github.com/fredmilhome/laffer_tobacco --skill power-analysis-fredmilhome

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires R, Python, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you compute statistical power and required sample size, as well as minimum detectable effect (MDE) for a study design, and generates a registry-ready power section.

Core Features & Use Cases

  • Power Analysis: Calculate power for two-arm RCTs, clustered RCTs, multiple-arm corrections, and non-standard designs using simulation.
  • Sample Size Calculation: Determine the required sample size to achieve a specific power and MDE.
  • Minimum Detectable Effect: Calculate the minimum effect size that can be detected with the given sample size and power.
  • Registry-Ready Reports: Generate power/MDE tables, power curves, and methods paragraphs for preregistration documents.

Quick Start

Run the power-analysis skill with the required parameters, e.g., power-analysis --mode power --design rct --input /path/to/spec.

Frequently Asked Questions about power-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate statistical power and sample size for a clustered RCT?

To calculate statistical power and sample size for a clustered RCT, you can use this Skill which supports two-arm and clustered study designs, outputting power tables and required sample sizes.

What is the minimum detectable effect for my study design?

The minimum detectable effect (MDE) is the smallest effect size identifiable given your sample size and power. This Skill computes MDE alongside power and generates MDE tables for analysis.

Do I need R or Python to run power analysis simulations for non-standard designs?

Yes, you need either R or Python to run power analysis simulations for non-standard designs. This Skill requires one of these environments to perform the statistical computations and generate outputs.

Can I generate a registry-ready methods paragraph for my preregistration document?

Yes, you can generate a registry-ready methods paragraph for a preregistration document. This Skill outputs methods paragraphs alongside power curves and MDE tables formatted in Markdown for reporting.

How do I calculate sample size corrections for multi-arm trial designs?

You calculate sample size corrections for multi-arm trial designs by specifying the multi-arm design parameters. This Skill performs the necessary multiple-arm corrections to determine the required sample size accurately.

What is the best way to visualize power curves for an RCT study design?

The best way to visualize power curves for an RCT study design is using this Skill, which generates visual power curves alongside MDE tables to help you assess the relationship between sample size and statistical power.