Description Usage Arguments Value Author(s) See Also Examples
Plot a biplot over each decomposed "pca" or "plsr" present in lmdme component object's slot.
1 2 3 |
x |
lmdme class object. |
comp |
a two component vector with the PC components to plot. Default comp=1:2. |
xlab |
character for the x-label title for PCA biplots. |
ylab |
character for the y-label title for PCA biplots. |
term |
character with the corresponding term/s for biploting. Default value is NULL in order to obtain every available biplot/s. |
mfcol |
numeric vector for par layout. If missing mfcol=c(1,2) will be used if more than one biplot is available. Use mfcol==NULL to override par call inside biplot function. |
xlabs,ylabs |
vector of character strings to label the first/second set of points. The default is to use dimname of "x"/"y", or "1:n" if the dimname is NULL for the respective set of points. If a single character is passed e.g. "o", the same character is used for all the points. |
which |
character to indicate the type of biplot to
use when plsr decomposition is applied. Default value is
"x" (X scores and loadings), "y" for (Y scores and
loadings), "scores" (X and Y scores) or "loadings" (X and
Y loadings). See |
... |
additional parameters for
|
plotted biplot/s of the component/s of the given lmdme
object. If par
() is called before this
function, the biplots can be arranged in the same window
Cristobal Fresno and Elmer A Fernandez
prcomp
, plsr
,
biplot.princomp
, biplot.mvr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | {
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.