Description Usage Arguments Value Note Examples
dContrast
is used to help build the contrast matrix
1 2 3 4 |
level_sorted |
a vector of levels (usually sorted) which are contrated to each other |
contrast.type |
the type of the contrast. It can be one of either 'average' for the contrast against the average of all levels, 'zero' for the contrast against the zero, 'sequential' for the contrast in a sequential order (it requires the levels being sorted properly), or 'pairwise' for the pairwise contrast. |
a list with following components:
each
: the contrast being specified
name
: the name of the contrast
none
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.