Contour plot of the t distribution in S^2 | R Documentation |
S^2
Contour plot of the t distribution in S^2
.
bivt.contour(x, type = "alr", n = 100, appear = TRUE, cont.line = FALSE)
x |
A matrix with compositional data. It has to be a 3 column matrix. |
type |
This is either "alr" or "ilr", corresponding to the additive and the isometric log-ratio transformation respectively. |
n |
The number of grid points to consider over which the density is calculated. |
appear |
Should the available data appear on the ternary plot (TRUE) or not (FALSE)? |
cont.line |
Do you want the contour lines to appear? If yes, set this TRUE. |
The alr or the ilr transformation is applied to the compositional data at first and the location, scatter and degrees of freedom of the bivariate t distribution are computed. Then for a grid of points within the 2-dimensional simplex the bivariate t density is calculated and the contours are plotted along with the points.
A ternary diagram with the points (if appear = TRUE) and the bivariate t contour lines.
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Christos Adam pada4m4@gmail.com.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
diri.contour, mix.compnorm.contour, compnorm.contour, skewnorm.contour
x <- as.matrix( iris[, 1:3] )
x <- x / rowSums(x)
bivt.contour(x)
bivt.contour(x, type = "ilr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.