make.design.matrix
creates the design matrix of dummies for fitting time series micorarray
gene expression experiments.
make.design.matrix(edesign, degree = 2, time.col = 1, repl.col = 2, group.cols = c(3:ncol(edesign)))
degree
= 1 returns linear regression, degree
= 2 returns quadratic regression, etcedesign
value passed as argument make.design.matrix
returns a design matrix where rows represent arrays and column variables of time, dummies and their interactions for up to the degree
given.
Dummies show the relative effect of each experimental group related to the first one. Single dummies indicate the abcissa component of each group.
$Time*dummy$ variables indicate slope changes, $Time^2*dummy$ indicates curvature changes. Higher grade values could model complex responses.
In case experimental groups share a initial state (i.e. common time 0), no single dummies are modeled.
data(edesign.abiotic, edesignCT)
make.design.matrix(edesign.abiotic) # quadratic model
make.design.matrix(edesignCT, degree = 3) # cubic model with common starting time point
Run the code above in your browser using DataLab