FTestPower.power(effect_size, df_num, df_denom, alpha, ncc=1)[source]

Calculate the power of a F-test.


standardized effect size, mean divided by the standard deviation. effect size has to be positive.

df_numint or float

numerator degrees of freedom.

df_denomint or float

denominator degrees of freedom.

alphafloat in interval (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.


degrees of freedom correction for non-centrality parameter. see Notes


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.


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)