SOURCEBOOK

R | Data Analysis

Post Hoc Comparisons

Prior to the steps below, enter the data as appropriate for the analyses (described elsewhere).

Obtaining Descriptive Statistics

Get the mean and standard deviation of the dependent variable for each of the levels.

by(Outcome,Factor,mean)
by(Outcome,Factor,sd)
Results <- aov(Outcome~Factor)
model.tables(Results,"means")

Obtaining Inferential Statistics

Test each pairwise comparison for statistical significance.

TukeyHSD(Results)