lmdme-loadingplot: 'loadingplot' of interaction PCA decomposed lmdme object

Description Usage Arguments Value Author(s) Examples

Description

This function plots the PCA loadings for a given interaction (A:B) lmdme object's components slot, for the given "pc" component. The user can choose which term (A or B) is used for x-axis and y-axis functions (B or A) respectively.

Usage

1
2
3
  ## S4 method for signature 'lmdme'
loadingplot(object, term.x, term.y,
  pc=1, ord.x, col, ...)

Arguments

object

lmdme class object.

term.x,term.y

character indicating the model principal factor for the interaction term (term.x:term.y or term.y:term.x) for the corresponding x or y axis.

pc

integer indicating which principal component loading is to be plotted on the y-axis. Default value is 1.

col

which color to use for each level present in term.y.

ord.x

numeric indicating the term.x levels order, for plotting purposes. If missing, the levels order is used.

...

additional parameters for matplot.

Value

loading plot of the selected interaction (term.x:term.y) lmdme object's components slot, if PCA decomposition was applied.

Author(s)

Cristobal Fresno and Elmer A Fernandez

Examples

 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
{
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, on those subjects/genes where at least
##one interaction coefficient is statistically different from zero (F-test
##on the coefficients).
id<-F.p.values(fit, term="time:oxygen")<0.001
decomposition(fit, decomposition="pca", scale="row", subset=id)

## Not run: 
loadingplot(fit, term.x="time", term.y="oxygen")

##Or change the axis order
loadingplot(fit, term.x="oxygen", term.y="time")

##Or change the PC to display
loadingplot(fit, term.x="time", term.y="oxygen", pc=2)

##Or the order of x-levels
loadingplot(fit, term.x="time", term.y="oxygen", ord.x=3:1)

## End(Not run)
}

lmdme documentation built on Nov. 8, 2020, 7:46 p.m.