{
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)
##Let's inspect how the decomposition process was carried out:
##a) The model formula used
##b) The design data.frame used
##c) The decomposition itself
fit.model<-model(fit)
fit.design<-design(fit)
fit.modelDecomposition<-modelDecomposition(fit)
##Getting the specific "time" term coefficients, p-values or F-values.
## Omit "term" parameter for all available terms.
timeCoef<-coef(fit,term="time")
fit.p.values<-p.values(fit,term="time")
fit.f.values<-F.p.values(fit,term="time")
##Getting the residuals or fitted values, for the interaction "time:oxygen"
## term. Omit "term" parameter for all available terms.
interactionResid<-resid(fit, term="time:oxygen")
interactionFit<-fitted(fit, term="time:oxygen")
}
Run the code above in your browser using DataLab