View source: R/contrast.matrix.R
contrast.matrix | R Documentation |
Construct the contrast matrix to make various comparsions of different treatments.
contrast.matrix(contrast, model.matrix.names)
contrast |
A vector of character strings specifying the various comparisons, which are the expressions constituted by model.matrix.names. |
model.matrix.names |
Column names of model (design) matrix. |
Matrix which columns correspond to contrasts.
model_variables <- c("A", "B", "C", "D")
contrast <- c("AvsB" = "A-B", "AvsC" = "A-C", 'AvsB.C.D'= "A-(B+C+D)/3")
contrast.matrix(contrast, model_variables)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.