######################################################
# pretest-post-test design with treatment group only #
######################################################
# a researcher is expecting a difference of Cohen's d = 0.30
# between post-test and pretest score translating into
# Eta-squared = 0.022
# adjust effect size for correlation with 'rho.within'
power.f.mixed.anova(eta.squared = 0.022,
factor.levels = c(1, 2), # 1 between 2 within
rho.within = 0.50,
effect = "within",
power = 0.80, alpha = 0.05)
# if effect size is already adjusted for correlation
# use 'rho.within = NA'
power.f.mixed.anova(eta.squared = 0.08255,
factor.levels = c(1, 2), # 1 between 2 within
rho.within = NA,
effect = "within",
power = 0.80, alpha = 0.05)
##########################################################
# post-test only design with treatment and control groups #
##########################################################
# a researcher is expecting a difference of Cohen's d = 0.50
# on the post-test score between treatment and control groups
# translating into Eta-squared = 0.059
power.f.mixed.anova(eta.squared = 0.059,
factor.levels = c(2, 1), # 2 between 1 within
effect = "between",
power = 0.80, alpha = 0.05)
#############################################################
# pretest-post-test design with treatment and control groups #
#############################################################
# a researcher is expecting a difference of Cohen's d = 0.40
# on the post-test score between treatment and control groups
# after controlling for the pretest translating into
# partial Eta-squared = 0.038
power.f.mixed.anova(eta.squared = 0.038,
factor.levels = c(2, 2), # 2 between 2 within
rho.within = 0.50,
effect = "between",
power = 0.80, alpha = 0.05)
# a researcher is expecting an interaction effect
# (between groups and time) of Eta-squared = 0.01
power.f.mixed.anova(eta.squared = 0.01,
factor.levels = c(2, 2), # 2 between 2 within
rho.within = 0.50,
effect = "interaction",
power = 0.80, alpha = 0.05)
# a researcher is expecting an interaction effect
# (between groups and time) of Eta-squared = 0.01
power.f.mixed.anova(eta.squared = 0.01,
factor.levels = c(2, 2), # 2 between 2 within
rho.within = 0.50,
effect = "within",
power = 0.80, alpha = 0.05)
Run the code above in your browser using DataLab