dContrast
is used to help build the contrast matrix
dContrast(level_sorted, contrast.type = c("average", "zero", "sequential", "pairwise"))
a list with following components:
each
: the contrast being specified
name
: the name of the contrast
none
level_sorted <- c("L1","L2","L3","L4") # the contrast against the average of all levels contrasts <- dContrast(level_sorted, contrast.type="average") # the contrast against the zero contrasts <- dContrast(level_sorted, contrast.type="zero") # the contrast in a sequential order contrasts <- dContrast(level_sorted, contrast.type="sequential") # the pairwise contrast contrasts <- dContrast(level_sorted, contrast.type="pairwise")