contrast.matrix {FLASHMM} | R Documentation |
Construct Contrast Matrix
Description
Construct the contrast matrix to make various comparsions of different treatments.
Usage
contrast.matrix(contrast, model.matrix.names)
Arguments
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. |
Value
Matrix which columns correspond to contrasts.
Examples
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)
[Package FLASHMM version 1.2.1 Index]