Learn R Programming

RVAideMemoire (version 0.9-27)

DA.var: Explained variance in Discriminant Analysis

Description

Calculate intergroup variance explained by components of a Discriminant Analysis (either obtained from the function lda) of the package MASS or the function plsda() of the package mixOmics).

Usage

DA.var(model)

Arguments

model
object of class "lda" (from the function lda() of the package MASS) or "plsda" (from the function plsda() of the package mixOmics).

See Also

lda, plsda

Examples

Run this code
# LDA model
require(MASS)
data(iris)
model.LDA <- lda(iris[,1:4],iris$Species)
DA.var(model.LDA)

# PLS-DA model
require(mixOmics)
data(yeast)
model.PLSDA <- plsda(t(yeast$data),yeast$strain.cond,ncomp=3)
DA.var(model.PLSDA)

Run the code above in your browser using DataLab