View source: R/folded.contour.R
Contour plot of the alpha-folded model in S^2 | R Documentation |
\alpha
-folded model in S^2
Contour plot of the \alpha
-folded model in S^2
.
folded.contour(mu, su, p, a, n = 100, x = NULL, cont.line = FALSE)
mu |
The mean vector of the folded model. |
su |
The covariance matrix of the folded model. |
p |
The probability inside the simplex of the folded model. |
a |
The value of a for the |
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. |
The \alpha
-transformation is applied to the compositional data and then for a grid
of points within the 2-dimensional simplex the folded model's density is calculated and
the contours are plotted.
The contour plot of the folded model appears.
Michail Tsagris and Christos Adam.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Christos Adam pada4m4@gmail.com.
Tsagris M. and Stewart C. (2022). A Review of Flexible Transformations for Modeling Compositional Data. In Advances and Innovations in Statistics and Data Science, pp. 225–234. https://link.springer.com/chapter/10.1007/978-3-031-08329-7_10
Tsagris M. and Stewart C. (2020). A folded model for compositional data analysis. Australian and New Zealand Journal of Statistics, 62(2): 249-277. https://arxiv.org/pdf/1802.07330.pdf
alfa.contour, compnorm.contour, diri.contour, mix.compnorm.contour,
bivt.contour, skewnorm.contour
x <- as.matrix(iris[, 1:3])
x <- x / rowSums(x)
a <- a.est(x)$best
mod <- alpha.mle(x, a)
folded.contour(mod$mu, mod$su, mod$p, a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.