lmFit
implementation. For example in a two factor experimental
design with interaction, the linear model of the i-th
observation (gene) can be written:
$X=\mu+A+B+AB+\epsilon$ where lmFit
function.lmdme
high level constructor for
the creation of the class instead of directly calling its
constructor by means of new.decomposition
, lmFit
{
data(stemHypoxia)
##Just to make a balanced dataset in the Fisher sense (2 samples per
## time*oxygen levels)
design<-design[design$time %in% c(0.5,1,5) & design$oxygen %in% c(1,5,21), ]
design$time<-as.factor(design$time)
design$oxygen<-as.factor(design$oxygen)
rownames(M)<-M[, 1]
#Keeping appropriate samples only
M<-M[, colnames(M) %in% design$samplename]
##ANOVA decomposition
fit<-lmdme(model=~time+oxygen+time:oxygen, data=M, design=design)
}
Run the code above in your browser using DataLab