Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

diri.contour

Contour plot of the Dirichlet distribution in S^2


Description

Contour plot of the Dirichlet distribution in S^2.

Usage

diri.contour(a, n = 100, x = NULL)

Arguments

a

A vector with three elements corresponding to the 3 (estimated) parameters.

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.

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.

Value

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

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>

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

Examples

x <- as.matrix( iris[, 1:3] )
x <- x / rowSums(x)
diri.contour( a = c(3, 4, 2) )

Compositional

Compositional Data Analysis

v4.6
GPL (>= 2)
Authors
Michail Tsagris [aut, cre], Giorgos Athineou [aut], Abdulaziz Alenazi [ctb]
Initial release
2021-04-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.