## variable representation for objects of class 'rcc'
data(nutrimouse)
X <- nutrimouse$lipid
Y <- nutrimouse$gene
nutri.res <- rcc(X, Y, ncomp = 3, lambda1 = 0.064, lambda2 = 0.008)
plotVar(nutri.res) #(default)
plotVar(nutri.res, comp = 1:2, cutoff = 0.5,
X.label = TRUE, Y.label = TRUE)
## variable representation for objects of class 'pls' or 'spls'
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50),
keepY = c(10, 10, 10))
plotVar(toxicity.spls, keep.var = TRUE, Y.label = TRUE)
## variable representation for objects of class 'splsda'
data(liver.toxicity)
X = as.matrix(liver.toxicity$gene)
Y = as.factor(liver.toxicity$treatment[,4])
keepX = 20
ncomp = 2
splsda.liver = splsda(X, Y, ncomp = ncomp, keepX = c(rep(keepX, ncomp)), mode = 'regression')
plotVar(splsda.liver, X.label = FALSE, Y.label = TRUE)
Run the code above in your browser using DataLab