R - Anova

About

To compare the gain scores across all groups, use anova

Steps

Homogeneity of variance assumption

First, check the homogeneity of variance assumption:

leveneTest(data$score, data$condition, center="mean")
Levene's Test for Homogeneity of Variance (center = "mean")
      Df F value Pr(>F)
group  3  1.1269 0.3436
      76
leveneTest(data$score, data$condition)
Levene's Test for Homogeneity of Variance (center = median)
      Df F value Pr(>F)
group  3  1.3134 0.2763
      76 

Anova

aov.model = aov(data$score ~ data$condition)
summary(aov.model)

Model comparison

anova(model1, model2)

Powered by ComboStrap