Step 4: calculate power / plan sample size
power_analysisCalculate statistical power for a planned hypothesis test from your sample size, or plan a two-group study by providing two of effect size, group size, or target power.
Instructions
In a hypothesis test (step 4): power of the planned test for the smallest effect the user cares about, using the data's sample size. smallest_effect is Cohen's d for means, r for correlations, or the true proportion p₁ for proportion tests. Ask the user for it; if they don't know, pass use_conventional: true. In an exploration: give two of effect_size, n_per_group, power to plan a two-group study.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | ||
| power | No | Target power (default 0.8 in a hypothesis test). | |
| alternative | No | two-sided | |
| effect_size | No | ||
| n_per_group | No | ||
| smallest_effect | No | ||
| use_conventional | No |