SOURCEBOOK

R | Data Analysis

Repeated Measures ANOVA

Prior to the steps below, enter the data as appropriate for the analyses (described elsewhere). As always, the following commands should be typed directly in the R console window.

Obtaining Descriptive Statistics

Get the sample sizes, means, and standard deviations for the variables.

lapply(RepeatedData, function(x) c(length(x), mean(x), sd(x)))

Obtaining Inferential Statistics

Get the ANOVA source table with tests of statistical significance.

Results=aov(Outcome~factor(Factor)+Error(factor(Subject)))
summary(Results)