# Example for between-subjects design Table 3.1 from
# Rosenthal, Rosnow and Rubin (2001)
data(rosenthal_tbl31)
contr_bw <- calc_contrast(
dv = dv,
between = between,
lambda_between = c("A" = -3, "B" = -1, "C" = 1, "D" = 3),
data = rosenthal_tbl31)
contr_bw
summary(contr_bw)
# Example for within-subjects design Calculation 16.6 from
# Sedlmeier and Renkewitz (2018, p. 537)
data(sedlmeier_p537)
contr_wi <- calc_contrast(
dv = reading_test,
within = music,
id = participant,
lambda_within = c(
"without music" = 1.25,
"white noise" = 0.25,
"classic" = -0.75,
"jazz" = -0.75
),
data = sedlmeier_p537
)
contr_wi
summary(contr_wi, ci = .90)
# Example for mixed-design Table 5.3 from
# Rosenthal, Rosnow and Rubin (2001)
data(rosenthal_tbl53)
contr_mx <- calc_contrast(dv = dv, between = between,
lambda_between = c("age8" = -1, "age10" = 0, "age12" = 1),
within = within,
lambda_within = c("1" = -3, "2" = -1,"3" = 1, "4" = 3),
id = id, data = rosenthal_tbl53
)
contr_mx
summary(contr_mx)
Run the code above in your browser using DataLab