Wednesday, March 16, 2016

Contrasts for ANOVA in R

A note to myself:
contrast function in rms package seems to be useful when forming contrast matrices.
glht function from multcomp package has a usage like
tmp <- expand.grid(tension = unique(warpbreaks$tension),wool = unique(warpbreaks$wool))
 X <- model.matrix(~ wool * tension, data = tmp)
 glht(mod, linfct = X)
There is an overwhelmingly big contrast package.

No comments:

Post a Comment