{
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)
##ASCA for all the available terms, over those subjects/genes where at least
##one interaction coefficient is statistically different from zero (F-test
##on coefficients).
id<-F.p.values(fit, term="time:oxygen")<0.001
decomposition(fit, decomposition="pca",scale="row",subset=id)
## Not run:
# ##Does not call par inside
# par(mfrow=c(2,2))
# biplot(fit, xlabs="o", mfcol=NULL)
#
# ##Just the term of interest
# biplot(fit, xlabs="o", term="time")
#
# ##In separate graphics
# biplot(fit, xlabs="o", term=c("time", "oxygen"), mfcol=c(1,1))
#
# ##All terms in the same graphic
# biplot(fit, xlabs="o", mfcol=c(1,3))
# ## End(Not run)
}
##Now using plsr on interaction coefficients
decomposition(fit, decomposition="plsr", term="time:oxygen", scale="row",
subset=id)
## Not run:
# par(mfrow=c(2,2))
#
# ##plsr biplot by default which="x"
# biplot(fit, which="x", mfcol=NULL)
#
# ##Other alternatives to which
# biplot(fit, which="y", mfcol=NULL)
# biplot(fit, which="scores", mfcol=NULL)
# biplot(fit, which="loadings", mfcol=NULL, xlabs="o")
# ## End(Not run)
Run the code above in your browser using DataLab