R arm of the Python modules morie.fn.pwr_t, pwr_p,
pwr_av and i_pwr; the missing quantity is found by
bisection to 1e-12. PowerTTest: the power function of
stats::power.t.test (noncentral t, ncp = sqrt(n/tsample) delta/sd);
strict = TRUE (default) includes the far rejection tail of a
two-sided test, FALSE is R's default. PowerPropTest: the
Fleiss normal approximation of stats::power.prop.test, or Cohen's
arcsine h (pwr::pwr.2p.test). PowerAnova: one-way ANOVA
power with Cohen's f (ncp = f^2 k n). CalculateInteractionPower:
noncentral-F power with ncp = f^2 N on (df1, N - df1 - 1).
Usage
PowerTTest(
n = NULL,
delta = NULL,
sd = 1,
alpha = 0.05,
power = NULL,
alternative = "two-sided",
type = "two-sample",
strict = TRUE
)
PowerPropTest(
n = NULL,
p1 = NULL,
p2 = NULL,
alpha = 0.05,
power = NULL,
alternative = "two-sided",
strict = TRUE,
method = "fleiss"
)
PowerAnova(n = NULL, k = NULL, f = NULL, alpha = 0.05, power = NULL)
CalculateInteractionPower(
sample_size,
alpha = 0.05,
effect_size = 0.2,
df1 = 1
)Arguments
- n
Sample size per group (
PowerTTest,PowerPropTest,PowerAnova).- delta
True difference in means.
- sd
Standard deviation.
- alpha
Significance level.
- power
Target power.
- alternative
"two-sided"or"one-sided".- type
"two-sample","one-sample"or"paired".- strict
Include the far rejection tail of a two-sided test.
- p1, p2
Proportions.
- method
"fleiss"or"cohen_h".- k
Number of groups.
- f
Cohen's f.
- sample_size
Total sample size N.
- effect_size
Cohen's f of the tested terms.
- df1
Numerator degrees of freedom.
