library(carData)
# The OBrienKaiser dataset from the carData package
ao <- OBrienKaiser
# Add a unique person identifier to the dataset
ao$pers <- 1:nrow(OBrienKaiser)
# One-way within-subjects ANOVA
# \donttest{
AObootWithin(
var.within = c("pre.1", "post.1", "fup.1"),
var.id = "pers",
levels.w1 = c("pre", "post", "fup"),
eff.si = "ges",
data = ao,
n.sim = 1000,
alpha = .05,
seed = 1234,
n.round = 2)
# }
# Two-way within-subjects ANOVA
# \donttest{
AObootWithin(
var.within = c("pre.1", "pre.2", "pre.3", "pre.4", "pre.5",
"post.1", "post.2", "post.3", "post.4", "post.5",
"fup.1", "fup.2", "fup.3", "fup.4", "fup.5"),
var.id = "pers",
levels.w1 = c("pre", "post", "fup"),
levels.w2 = c("1", "2", "3", "4", "5"),
eff.si = "pes",
data = ao,
n.sim = 1000,
alpha = .05,
seed = 1234,
n.round = 2)
# }
Run the code above in your browser using DataLab