Learn R Programming

Compositional (version 5.5)

Contour plot of mixtures of Dirichlet distributions in S^2: Contour plot of mixtures of Dirichlet distributions in \(S^2\)

Description

Contour plot of mixtures of Dirichlet distributions in \(S^2\).

Usage

mixdiri.contour(a, prob, n = 100, x = NULL, cont.line = FALSE)

Arguments

a

A matrix where each row contains the parameters of each Dirichlet disctribution.

prob

A vector with the mixing probabilities.

n

The number of grid points to consider over which the density is calculated.

x

This is either NULL (no data) or contains a 3 column matrix with compositional data.

cont.line

Do you want the contour lines to appear? If yes, set this TRUE.

Value

A ternary diagram with the points and the Dirichlet contour lines.

Details

The user can plot only the contour lines of a Dirichlet with a given vector of parameters, or can also add the relevant data should he/she wish to.

References

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

diri.contour, compnorm.contour, bivt.contour, comp.kerncontour, mix.compnorm.contour, diri.nr, dda

Examples

Run this code
# NOT RUN {
a <- matrix( c(12, 30, 45, 32, 50, 16), byrow = TRUE,ncol = 3)
prob <- c(0.5, 0.5)
mixdiri.contour(a, prob)
# }

Run the code above in your browser using DataLab