modelMatrix {limma} | R Documentation |
Construct design matrix from RNA target information.
modelMatrix(targets, parameters, ref, verbose=TRUE) uniqueTargets(targets)
targets |
matrix or data.frame with columns Cy3 and Cy5 specifying which RNA was hybridized to each array |
parameters |
matrix specifying contrasts between RNA samples which should correspond to regression coefficients.
Row names should correspond to unique RNA sample names found in targets . |
ref |
character string giving name of common reference RNA if such exists.
Exactly one argument of parameters or ref should be specified. |
verbose |
logical, if TRUE then unique names found in targets will be printed to standard output |
This function is intended to produce a design matrix for use in functions lmFit
etc for two-color microarray experiments.
modelMatrix
produces a design matrix with row names as in targets
and column names as in parameters
.
uniqueTargets
produces a character vector of unique target names from the columns Cy3
and Cy5
of targets
.
Gordon Smyth
model.matrix
in the stats package.
An overview of linear model functions in limma is given by 5.LinearModels.
targets <- cbind(Cy3=c("Ref","Control","Ref","Treatment"),Cy5=c("Control","Ref","Treatment","Ref")) rownames(targets) <- paste("Array",1:4) parameters <- cbind(C=c(-1,1,0),T=c(-1,0,1)) rownames(parameters) <- c("Ref","Control","Treatment") modelMatrix(targets, parameters) modelMatrix(targets, ref="Ref")