Learn R Programming

Compositional (version 5.5)

Dirichlet discriminant analysis: Dirichlet discriminant analysis

Description

Dirichlet discriminant analysis.

Usage

dda(xnew, x, ina)

Arguments

xnew

A matrix with the new compositional predictor data whose class you want to predict. Zeros are allowed.

x

A matrix with the available compositional predictor data. Zeros are allowed.

ina

A vector of data. The response variable, which is categorical (factor is acceptable).

Value

A vector with the estimated group.

Details

The funcitons performs maximum likelihood discriminant analysis using the Dirichlet distribution.

References

Friedman J., Hastie T. and Tibshirani R. (2017). The elements of statistical learning. New York: Springer.

Thomas P. Minka (2003). Estimating a Dirichlet distribution. http://research.microsoft.com/en-us/um/people/minka/papers/dirichlet/minka-dirichlet.pdf

Ng Kai Wang, Guo-Liang Tian and Man-Lai Tang (2011). Dirichlet and related distributions: Theory, methods and applications. John Wiley & Sons.

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

See Also

cv.dda, comp.nb, alfa.rda, alfa.knn, comp.knn, mix.compnorm, diri.reg, zadr

Examples

Run this code
# NOT RUN {
x <- Compositional::rdiri(100, runif(5) )
ina <- rbinom(100, 1, 0.5) + 1
mod <- dda(x, x, ina )
# }

Run the code above in your browser using DataLab