statsmodels.stats.power.FTestPower.power¶
- FTestPower.power(effect_size, df_num, df_denom, alpha, ncc=1)[source]¶
 Calculate the power of a F-test.
The effect size is Cohen’s
f, square root off2.The sample size is given by
nobs = df_denom + df_num + nccWarning: The meaning of df_num and df_denom is reversed.
- Parameters:¶
 - effect_size
float Standardized effect size. The effect size is here Cohen’s
f, square root off2.- df_num
intorfloat Warning incorrect name denominator degrees of freedom, This corresponds to the number of constraints in Wald tests.
- df_denom
intorfloat Warning incorrect name numerator degrees of freedom. This corresponds to the df_resid in Wald tests.
- alpha
floatininterval(0,1) significance level, e.g. 0.05, is the probability of a type I error, that is wrong rejections if the Null Hypothesis is true.
- ncc
int degrees of freedom correction for non-centrality parameter. see Notes
- effect_size
 - Returns:¶
 - power
float Power of the test, e.g. 0.8, is one minus the probability of a type II error. Power is the probability that the test correctly rejects the Null Hypothesis if the Alternative Hypothesis is true.
- power
 
Notes
sample size is given implicitly by df_num
set ncc=0 to match t-test, or f-test in LikelihoodModelResults. ncc=1 matches the non-centrality parameter in R::pwr::pwr.f2.test
ftest_power with ncc=0 should also be correct for f_test in regression models, with df_num and d_denom as defined there. (not verified yet)