Compositional7.0 package

Compositional Data Analysis

a.est

Estimation of the value of α\alpha in the folded model

acor

α\alpha-generalised correlations between two compositional datasets

acor.tune

Tuning of the α\alpha-generalised correlations between two compositio...

aeqdist.etest

Energy test of equality of distributions using the α\alpha-transforma...

ait

The α\alpha-IT transformation

ait.test

Aitchison's test for two mean vectors and/or covariance matrices

aitdist

The α\alpha-IT-distance

alfa.contour

Contour plot of the α\alpha multivariate normal in S2S^2

akern.reg

The α\alpha-kernel regression with compositional response data

akernreg.tune

Cross validation for the α\alpha-kernel regression with compositional...

aknn.reg

The α\alpha-k-NN regression for compositional response data

aknnreg.tune

Cross validation for the α\alpha-k-NN regression with compositional r...

alr.all

All pairwise additive log-ratio transformations

alfa.knn.reg

The α\alpha-k-NN regression with compositional predictor variables

alfa.lasso

LASSO with compositional predictors using the alphaalpha-transformation

alfa.mds

Principal coordinate analysis using the α\alpha-distance

alfa.mix.norm

Gaussian mixture models for compositional data using the α\alpha-tran...

alfa.nb

Naive Bayes classifiers for compositional data using the α\alpha-tran...

alfa.pca

Principal component analysis using the α\alpha-transformation

alfa.pcr

Multivariate or univariate regression with compositional data in the c...

alfa.pprcomp

Projection pursuit regression with compositional predictor variables u...

alfa.profile

Estimation of the value of α\alpha via the alfa profile log-likelihoo...

alfa

The α\alpha-transformation

alfa.rda

Regularised and flexible discriminant analysis for compositional data ...

alfa.reg

Regression with compositional data using the α\alpha-transformation

alfa.ridge

Ridge regression with compositional data in the covariates side using ...

alfa.tune

Fast estimation of the value of α\alpha

alfadist

The α\alpha-distance

alfainv

Inverse of the α\alpha-transformation

alfaknnreg.tune

Cross validation for the α\alpha-k-NN regression with compositional p...

alfalasso.tune

Cross-validation for LASSO with compositional predictors using the $al...

alfanb.tune

Cross-validation for the naive Bayes classifiers for compositional dat...

alfann

The k-nearest neighbours using the α\alpha-distance

alfapcr.tune

Tuning the number of PCs in the PCR with compositional data using the ...

alfapprcomp.tune

Tuning of the projection pursuit regression with compositional predict...

alfarda.tune

Cross validation for the regularised and flexible discriminant analysi...

alfareg.tune

Tuning the value of α\alpha in the α\alpha-regression

alfaridge.plot

Ridge regression plot

alfaridge.tune

Cross validation for the ridge regression with compositional data as p...

alpha.mle

MLE of the folded model for a given value of α\alpha

alr

The additive log-ratio transformation and its inverse

ascls

The α\alpha-SCLS model for compositional responses and predictors

atflr

The α\alpha-TFLR model for compositional responses and predictors

bc

The Box-Cox transformation applied to ratios of components

beta.est

MLE of distributions defined in the (0, 1) interval

beta.reg

Beta regression

bic.alfamixnorm

Mixture model selection with the α\alpha-transformation using BIC

bic.mixcompnorm

Mixture model selection via BIC

bivt.contour

Contour plot of the t distribution in S2S^2

comp.nb

Naive Bayes classifiers for compositional data

colbeta.mle

Column-wise MLE of some univariate distributions

comp.den

Estimating location and scatter parameters for compositional data

comp.kern

Multivariate kernel density estimation for compositional data

comp.kerncontour

Contour plot of the kernel density estimate in S2S^2

comp.knn

The k-NN algorithm for compositional data

comp.ppr

Projection pursuit regression for compositional data

comp.reg

Multivariate regression with compositional data

comp.test

Hypothesis testing for two or more compositional mean vectors

compknn.tune

Tuning of the k-NN algorithm for compositional data

compnorm.contour

Contour plot of the normal distribution in S2S^2

Compositional-package

Compositional Data Analysis

compppr.tune

Tuning of the projection pursuit regression for compositional data

cv.ascls

Cross-validation for the alphaalpha-SCLS model

cv.atflr

Cross-validation for the alphaalpha-TFLR model

cv.comp.reg

Cross validation for some compositional regression models

cv.compnb

Cross-validation for the naive Bayes classifiers for compositional dat...

cv.dda

Cross-validation for the Dirichlet discriminant analysis

cv.lasso.compreg

Cross-validation for the LASSO log-ratio regression with compositional...

cv.lasso.klcompreg

Cross-validation for the LASSO Kullback-Leibler divergence based regre...

cv.scls

Cross-validation for the SCLS model

cv.tflr

Cross validation for the TFLR model

dda

Dirichlet discriminant analysis

ddiri

Density values of a Dirichlet distribution

dfd

Density of the Flexible Dirichlet distribution

dfolded

Density of the folded model normal distribution

dgendiri

Density values of a generalised Dirichlet distribution

diri.contour

Contour plot of the Dirichlet distribution in S2S^2

diri.est

MLE of the a Dirichlet distribution

diri.nr

MLE of the Dirichlet distribution via Newton-Rapshon

diri.reg

Dirichlet regression

dirimean.test

Log-likelihood ratio test for a Dirichlet mean vector

divergence

Divergence matrix of compositional data

dmix.compnorm

Simulation of compositional data from Gaussian mixture models

dmixdiri

Density values of a mixture of Dirichlet distributions

dptest

Projections based test for distributional equality of two groups

esov.mds

Principal coordinate analysis using the Jensen-Shannon divergence

esov

The ESOV-distance

fd.contour

Contour plot of the Flexible Dirichlet distribution in S2S^2

folded.contour

Contour plot of the α\alpha-folded model in S2S^2

fp

The folded power transformation

frechet

The Frechet mean for compositional data

frechet2

Helper Frechet mean for compositional data

gendiri.contour

Contour plot of the generalised Dirichlet distribution in S2S^2

lc.reg

Log-contrast regression with compositional predictor variables

glm.pcr

Principal component generalised linear models

glmpcr.tune

Tuning the principal components with GLMs

green

Greenacre's power transformation

hd.meantest2

Two-sample test of high-dimensional means for compositional data

helm

The Helmert sub-matrix

lc.reg2

Log-contrast regression with multiple compositional predictors

ice.akernreg

ICE plot for the α\alpha-kernel regression

ice.aknnreg

ICE plot for the αkNN\alpha-k-NN regression

ice.kernreg

ICE plot for univariate kernel regression

ice.pprcomp

ICE plot for projection pursuit regression with compositional predicto...

kern.reg

Kernel regression with a numerical response vector or matrix

rgendiri

Generalised Dirichlet random values simulation

kernreg.tune

Cross validation for the kernel regression with Euclidean response dat...

kl.alfapcr

Divergence based regression for compositional data with compositional ...

kl.compreg

Divergence based regression for compositional data

kl.compreg2

Helper functions for the Kullback-Leibler regression

kl.diri.normal

Minimized Kullback-Leibler divergence between Dirichlet and logistic n...

kl.diri

Kullback-Leibler divergence and Bhattacharyya distance between two Dir...

klalfapcr.tune

Tuning of the divergence based regression for compositional data with ...

lasso.compreg

LASSO log-ratio regression with compositional response

lasso.klcompreg

LASSO Kullback-Leibler divergence based regression

lassocoef.plot

Plot of the LASSO coefficients

lc.glm

Log-contrast GLMS with compositional predictor variables

lc.glm2

Log-contrast logistic or Poisson regression with with multiple composi...

lc.rq

Log-contrast quantile regression with compositional predictor variable...

lc.rq2

Log-contrast quantile regression with with multiple compositional pred...

lcglm.aov

ANOVA for the log-contrast GLM versus the uncostrained GLM

lcreg.aov

ANOVA for the log-contrast regression versus the uncostrained linear r...

logpca

Principal component analysis

makefolds

Generate random folds for cross-validation

mix.compnorm.contour

Contour plot of the Gaussian mixture model in S2S^2

mix.compnorm

Gaussian mixture models for compositional data

mixdiri.contour

Contour plot of mixtures of Dirichlet distributions in S2S^2

mkde

Multivariate kernel density estimation

mkde.tune

Tuning of the bandwidth h of the kernel using the maximum likelihood c...

mlr

The multiplicative log-ratio transformation and its inverse

multivreg

Multivariate linear regression

multivt

MLE for the multivariate t distribution

ols.compreg

Non linear least squares regression for compositional data

ols.prop.reg

Distance based regression models for proportions

pcc

Proportionality correlation coefficient matrix

perturbation

Perturbation operation

pivot

The pivot coordinate transformation and its inverse

pow

Power operation

pprcomp

Projection pursuit regression with compositional predictor variables

pprcomp.tune

Tuning of the projection pursuit regression with compositional predict...

probout

Estimation of the probability left outside the simplex when using the ...

propreg

Quasi binomial regression for proportions

rbeta1

Random values generation from some univariate distributions defined on...

rcompnorm

Multivariate normal random values simulation on the simplex

rcompsn

Multivariate skew normal random values simulation on the simplex

rcompt

Multivariate t random values simulation on the simplex

rdiri

Dirichlet random values simulation

rfd

Simulation of compositional data from the Flexible Dirichlet distribut...

rfolded

Simulation of compositional data from the folded model normal distribu...

ridge.plot

Ridge regression plot

ridge.reg

Ridge regression

ridge.tune

Cross validation for the ridge regression

rmixcomp

Simulation of compositional data from Gaussian mixture models

rmixdiri

Simulation of compositional data from mixtures of Dirichlet distributi...

scls.betest

Permutation test for the matrix of coefficients in the SCLS model

scls.indeptest

Permutation linear independence test in the SCLS model

scls

Simplicial constrained linear least squares (SCLS) for compositional r...

scls2

The SCLS model with multiple compositional predictors

scrq

Simplicial constrained median regression for compositional responses a...

skewnorm.contour

Contour plot of the skew skew-normal distribution in S2S^2

spatmed.reg

Spatial median regression

sym.test

Log-likelihood ratio test for a symmetric Dirichlet distribution

ternary.coef

Ternary diagram with the coefficients of the simplicial-simplicial reg...

ternary.coefcr

Ternary diagram with confidence region for the matrix of coefficients ...

ternary.mcr

Ternary diagram with confidence region for the mean

ternary

Ternary diagram

ternary.reg

Ternary diagram of regression models

tflr.betest

Permutation test for the matrix of coefficients in the TFLR model

tflr.indeptest

Permutation linear independence test in the TFLR model

tflr

Transformation-free linear regression (TFLR) for compositional respons...

tflr2

The TFLR model with multiple compositional predictors

totvar

Total variability

ulc.glm

Unconstrained GLMs with compositional predictor variables

ulc.glm2

Unconstrained logistic or Poisson regression with multiple composition...

ulc.reg

Unconstrained linear regression with compositional predictor variables

ulc.reg2

Unconstrained linear regression with multiple compositional predictors

ulc.rq

Unconstrained quantile regression with compositional predictor variabl...

ulc.rq2

Unconstrained quantile regression with multiple compositional predicto...

unitweib.reg

Unit-Weibull regression models for proportions

zad.est

MLE of the zero adjusted Dirichlet distribution

zadr

Zero adjusted Dirichlet regression

zeroreplace

Non-parametric zero replacement strategies

Regression, classification, contour plots, hypothesis testing and fitting of distributions for compositional data are some of the functions included. We further include functions for percentages (or proportions). The standard textbook for such data is John Aitchison's (1986) "The statistical analysis of compositional data". Relevant papers include: a) Tsagris M.T., Preston S. and Wood A.T.A. (2011). "A data-based power transformation for compositional data". Fourth International International Workshop on Compositional Data Analysis. <doi:10.48550/arXiv.1106.1451> b) Tsagris M. (2014). "The k-NN algorithm for compositional data: a revised approach with and without zero values present". Journal of Data Science, 12(3): 519--534. <doi:10.6339/JDS.201407_12(3).0008>. c) Tsagris M. (2015). "A novel, divergence based, regression for compositional data". Proceedings of the 28th Panhellenic Statistics Conference, 15-18 April 2015, Athens, Greece, 430--444. <doi:10.48550/arXiv.1511.07600>. d) Tsagris M. (2015). "Regression analysis with compositional data containing zero values". Chilean Journal of Statistics, 6(2): 47--57. <https://soche.cl/chjs/volumes/06/02/Tsagris(2015).pdf>. e) Tsagris M., Preston S. and Wood A.T.A. (2016). "Improved supervised classification for compositional data using the alpha-transformation". Journal of Classification, 33(2): 243--261. <doi:10.1007/s00357-016-9207-5>. f) Tsagris M., Preston S. and Wood A.T.A. (2017). "Nonparametric hypothesis testing for equality of means on the simplex". Journal of Statistical Computation and Simulation, 87(2): 406--422. <doi:10.1080/00949655.2016.1216554>. g) Tsagris M. and Stewart C. (2018). "A Dirichlet regression model for compositional data with zeros". Lobachevskii Journal of Mathematics, 39(3): 398--412. <doi:10.1134/S1995080218030198>. h) Alenazi A. (2019). "Regression for compositional data with compositional data as predictor variables with or without zero values". Journal of Data Science, 17(1): 219--238. <doi:10.6339/JDS.201901_17(1).0010>. i) Tsagris M. and Stewart C. (2020). "A folded model for compositional data analysis". Australian and New Zealand Journal of Statistics, 62(2): 249--277. <doi:10.1111/anzs.12289>. j) Alenazi A. (2021). Alenazi, A. (2023). "A review of compositional data analysis and recent advances". Communications in Statistics--Theory and Methods, 52(16): 5535--5567. <doi:10.1080/03610926.2021.2014890>. k) Alenazi A.A. (2022). "f-divergence regression models for compositional data". Pakistan Journal of Statistics and Operation Research, 18(4): 867--882. <doi:10.18187/pjsor.v18i4.3969>. l) 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. <doi:10.1007/978-3-031-08329-7_10>. m) Tsagris M., Alenazi A. and Stewart C. (2023). "Flexible non-parametric regression models for compositional response data with zeros". Statistics and Computing, 33(106). <doi:10.1007/s11222-023-10277-5>. n) Tsagris. M. (2024). "Constrained least squares simplicial-simplicial regression". <doi:10.48550/arXiv.2403.19835>.

  • Maintainer: Michail Tsagris
  • License: GPL (>= 2)
  • Last published: 2024-08-23