rm.anova {vannstats} | R Documentation |
Simplified One-Way Repeated Measures Analysis of Variance
Description
This function simplifies the call for repeated measures ANOVA (rm.anova) on a given data frame. Also allows calls for sphericity correction (correct), as well as a sphericity test table (sph).
Usage
rm.anova(
df,
id,
times,
scores = NULL,
correct = TRUE,
sph = FALSE,
phc = FALSE
)
Arguments
df |
data frame to read in. |
id |
the main grouping variable by which |
times |
dependent variable values at the time points measured. If data are in wide form (where time points are listed as separate variables for each observation), read in as a list of time point variables (e.g. |
scores |
if data are in long form (where each group has multiple observations), a |
correct |
logical (default set to |
sph |
logical (default set to |
phc |
logical (default set to |
Examples
data <- howell_aids_wide
rm.anova(data, student, c("t1","t2","t3"))
data2 <- howell_aids_long
rm.anova(data2, student, time, scores=knowledge)