pwrss.f.rmanova | R Documentation |
Calculates statistical power or minimum required sample size for one-way Repeated Measures Analysis of Variance (RM-ANOVA).
Formulas are validated using Monte Carlo simulation, G*Power, and tables in PASS documentation.
pwrss.f.rmanova(eta2 = 0.10, f2 = eta2/(1 - eta2),
corr.rm = 0.50, n.levels = 2, n.rm = 2,
epsilon = 1, alpha = 0.05,
type = c("between","within","interaction"),
n = NULL, power = NULL, verbose = TRUE)
eta2 |
expected (partial) Eta-squared |
f2 |
expected Cohen's f-squared (an alternative to |
corr.rm |
expected correlation between repeated measures. For example, for pretest/posttest designs, this is the correlation between pretest and posttest scores regardless of group membership. The default is 0.50 |
n.levels |
number of levels (groups). For example, for randomized controlled trials with two arms (treatment/control) it takes a value of 2 |
n.rm |
number of measurements. For example, for pretest/posttest designs it takes a value of 2. When there is a follow-up test it takes a value of 3 |
epsilon |
non-sperhicity correction factor, default is 1 (means no violation of sphericity). Lower bound for this argument is |
n |
total sample size |
power |
statistical power |
alpha |
probability of type I error |
type |
the effect to be tested: "between", "within", or "interaction". The type of the effect depends on the hypothesis test. If the interest is in the group effect after controlling for the time effect use "between"; if the interest is the time effect after controlling for the group membership use "within"; if the interest is in the group x time interaction use "interaction" |
verbose |
if |
parms |
list of parameters used in calculation |
test |
type of the statistical test (F test) |
df1 |
numerator degrees of freedom |
df2 |
denominator degrees of freedom |
ncp |
non-centrality parameter |
power |
statistical power |
n |
total sample size |
Bulus, M., & Polat, C. (in press). pwrss R paketi ile istatistiksel guc analizi [Statistical power analysis with pwrss R package]. Ahi Evran Universitesi Kirsehir Egitim Fakultesi Dergisi. https://osf.io/ua5fc/download/
######################################################
# pretest-posttest design with treatment group only #
######################################################
# a researcher is expecting a difference of Cohen's d = 0.30
# between posttest and pretest score translating into
# Eta-squared = 0.022
pwrss.f.rmanova(eta2 = 0.022, n.levels = 1, n.rm = 2,
corr.rm = 0.50, type = "within",
alpha = 0.05, power = 0.80)
# paired t-test approach
pwrss.t.2means(mu1 = 0.30, mu2 = 0,
sd1 = 1, sd2 = 1,
paired = TRUE, paired.r = 0.50,
alpha = 0.05, power = 0.80)
##########################################################
# posttest only design with treatment and control groups #
##########################################################
# a researcher is expecting a difference of Cohen's d = 0.50
# on the posttest score between treatment and control groups
# translating into Eta-squared = 0.059
pwrss.f.rmanova(eta2 = 0.059, n.levels = 2, n.rm = 1,
type = "between",
alpha = 0.05, power = 0.80)
# independent t-test approach
pwrss.t.2means(mu1 = 0.50, mu2 = 0,
sd1 = 1, sd2 = 1,
alpha = 0.05, power = 0.80)
#############################################################
# pretest-posttest design with treatment and control groups #
#############################################################
# a researcher is expecting a difference of Cohen's d = 0.40
# on the posttest score between treatment and control groups
# after controlling for the pretest translating into
# partial Eta-squared = 0.038
pwrss.f.rmanova(eta2 = 0.038, n.levels = 2, n.rm = 2,
corr.rm = 0.50, type = "between",
alpha = 0.05, power = 0.80)
# regression approach
p <- 0.50 # proportion of subjects in treatment group
pwrss.t.reg(beta1 = 0.40, r2 = 0.25, k = 2,
sdx = sqrt(p*(1-p)),
alpha = 0.05, power = 0.80)
# a researcher is expecting an interaction effect
# (between groups and time) of Eta-squared = 0.01
pwrss.f.rmanova(eta2 = 0.01, n.levels = 2, n.rm = 2,
corr.rm = 0.50, type = "interaction",
alpha = 0.05, power = 0.80)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.