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.
Get the mean, sample size, and standard deviation for the dependent variable for each of the levels. Also, get the means for the main effects.
Results <- aov(Outcome ~ FactorA * FactorB)
model.tables(Results, "means")
lapply(
split(Outcome, interaction(FactorA, FactorB)),
function(x) c(n = length(x), mean = mean(x), sd = sd(x))
)
Get the analysis of variance source table with tests of statistical significance.
summary(Results)