Package: Compositional 7.1

Michail Tsagris

Compositional: Compositional Data Analysis

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>.

Authors:Michail Tsagris [aut, cre], Giorgos Athineou [aut], Abdulaziz Alenazi [ctb], Christos Adam [ctb]

Compositional_7.1.tar.gz
Compositional_7.1.tar.gz(r-4.5-noble)Compositional_7.1.tar.gz(r-4.4-noble)
Compositional_7.1.tgz(r-4.4-emscripten)Compositional_7.1.tgz(r-4.3-emscripten)
Compositional.pdf |Compositional.html
Compositional/json (API)

# Install 'Compositional' in R:
install.packages('Compositional', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

4.55 score 2 stars 4 packages 127 scripts 1.7k downloads 1 mentions 222 exports 76 dependencies

Last updated 28 days agofrom:c8e1288a41. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 10 2024
R-4.5-linuxOKOct 10 2024

Exports:a.esta.mleacoracor.tuneaeqdist.etestaitait.knnait.testaitdistaitdistaaitknn.tuneakern.regakernreg.tuneaknn.regaknnreg.tunealefalfaalfa.contouralfa.fdaalfa.knnalfa.knn.regalfa.lassoalfa.mdsalfa.mix.normalfa.nbalfa.pcaalfa.pcralfa.pprcompalfa.profilealfa.rdaalfa.regalfa.reg2alfa.reg3alfa.ridgealfa.tunealfadistalfadistaalfafda.tunealfainvalfaknn.tunealfaknnreg.tunealfalasso.tunealfanb.tunealfannalfapcr.tunealfapprcomp.tunealfarda.tunealfareg.tunealfaridge.plotalfaridge.tunealpha.mlealralr.allalrinvasclsatflrbcbeta.estbeta.regbic.alfamixnormbic.mixcompnormbivt.contourcolbeta.estcollogitnorm.estcolunitweibull.estcolzilogitnorm.estcomp.dencomp.kerncomp.kerncontourcomp.knncomp.nbcomp.pprcomp.regcomp.testcompknn.tunecompnorm.contourcompppr.tunecv.asclscv.atflrcv.comp.regcv.compnbcv.ddacv.lasso.compregcv.lasso.klcompregcv.sclscv.scrqcv.tflrddaddiridfddfoldeddgendiridiri.contourdiri.estdiri.nrdiri.regdiri.reg2diri.reg3dirimean.testdivergencedmix.compnormdmixdiridptestesesovesov.mdsesovafd.contourfolded.contourfpfrechetfrechet2gendiri.contourglm.pcrglmpcr.tunegreenhd.meantest2helling.prop.reghelmhsecant01.estibeta.estice.akernregice.aknnregice.kernregice.pprcompjs.compregkern.regkernreg.tunekl.alfapcrkl.compregkl.compreg2kl.dirikl.diri.normalklalfapcr.tuneklcompreg.bootkumar.estlasso.compreglasso.klcompreglassocoef.plotlc.glmlc.glm2lc.reglc.reg2lc.rqlc.rq2lcglm.aovlcreg.aovlogitnorm.estlogpcamakefoldsmix.compnormmix.compnorm.contourmixdiri.contourmkdemkde.tunemlrmlrinvmultinompcr.tunemultivregmultivtols.compregols.prop.regpccpcr.tuneperturbationpivotpivotinvpowpprcomppprcomp.tuneproboutpropregpropregsrbeta1rcompnormrcompsnrcomptrdiriread.fbmrfdrfoldedrgendiriridge.plotridge.regridge.tunerlogitnormrmixcomprmixdirirunitweibullsclsscls.betestscls.indeptestscls2scrqskewnorm.contourspatmed.regsym.testsymkl.compregternaryternary.coefternary.coefcrternary.mcrternary.regtflrtflr.betesttflr.indeptesttflr2totvartv.compregulc.glmulc.glm2ulc.regulc.reg2ulc.rqulc.rq2unitweib.regunitweibull.estzad.estzadrzadr2zeroreplacezilogitnorm.est

Dependencies:BHbigassertrbigparallelrbigstatsrbitbootclasscliclustercodetoolscolorspacecowplotdoParallelemplikenergyfansifarverffflockforeachggplot2glmnetgluegslgtableisobanditeratorslabelinglatticelifecyclemagrittrMASSMatrixMatrixModelsmdamgcvminpack.lmmixturemnormtmunsellmvhtestsnlmennetnumDerivparallellypillarpkgconfigpsquadprogquantregR6RColorBrewerRcppRcppArmadilloRcppEigenRcppGSLRcppParallelRcppZigguratregdaRfastRfast2RhpcBLASctlrlangrmioRnanoflannRSpectrascalesshapesnSparseMsurvivaltibbleutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Compositional Data AnalysisCompositional-package
Aitchison's test for two mean vectors and/or covariance matricesait.test
All pairwise additive log-ratio transformationsalr.all
alpha-generalised correlations between two compositional datasetsacor
ANOVA for the log-contrast GLM versus the uncostrained GLMlcglm.aov
ANOVA for the log-contrast regression versus the uncostrained linear regressionlcreg.aov
Beta regressionbeta.reg
Column-wise MLE of some univariate distributionscolbeta.est collogitnorm.est colunitweibull.est colzilogitnorm.est
Contour plot of mixtures of Dirichlet distributions in S^2mixdiri.contour
Contour plot of the alpha multivariate normal in S^2alfa.contour
Contour plot of the alpha-folded model in S^2folded.contour
Contour plot of the Dirichlet distribution in S^2diri.contour
Contour plot of the Flexible Dirichlet distribution in S^2fd.contour
Contour plot of the Gaussian mixture model in S^2mix.compnorm.contour
Contour plot of the generalised Dirichlet distribution in S^2gendiri.contour
Contour plot of the kernel density estimate in S^2comp.kerncontour
Contour plot of the normal distribution in S^2compnorm.contour
Contour plot of the skew skew-normal distribution in S^2skewnorm.contour
Contour plot of the t distribution in S^2bivt.contour
Cross validation for some compositional regression modelscv.comp.reg
Cross validation for the alpha-k-NN regression with compositional predictor variablesalfaknnreg.tune
Cross validation for the alpha-k-NN regression with compositional response dataaknnreg.tune
Cross validation for the alpha-kernel regression with compositional response dataakernreg.tune
Cross validation for the kernel regression with Euclidean response datakernreg.tune
Cross validation for the regularised and flexible discriminant analysis with compositional data using the alpha-transformationalfafda.tune alfarda.tune
Cross validation for the ridge regressionridge.tune
Cross validation for the ridge regression with compositional data as predictor using the alpha-transformationalfaridge.tune
Cross validation for the TFLR modelcv.tflr
Cross-validation for LASSO with compositional predictors using the alpha-transformationalfalasso.tune
Cross-validation for the alpha-SCLS modelcv.ascls
Cross-validation for the alpha-TFLR modelcv.atflr
Cross-validation for the Dirichlet discriminant analysiscv.dda
Cross-validation for the LASSO Kullback-Leibler divergence based regressioncv.lasso.klcompreg
Cross-validation for the LASSO log-ratio regression with compositional responsecv.lasso.compreg
Cross-validation for the naive Bayes classifiers for compositional datacv.compnb
Cross-validation for the naive Bayes classifiers for compositional data using the alpha-transformationalfanb.tune
Cross-validation for the SCLS modelcv.scls
Cross-validation for the SCRQ modelcv.scrq
Simulation of compositional data from Gaussian mixture modelsdmix.compnorm
Density of the Flexible Dirichlet distributiondfd
Density of the folded model normal distributiondfolded
Density values of a Dirichlet distributionddiri
Density values of a generalised Dirichlet distributiondgendiri
Density values of a mixture of Dirichlet distributionsdmixdiri
Dirichlet discriminant analysisdda
Dirichlet random values simulationrdiri
Dirichlet regressiondiri.reg diri.reg2 diri.reg3
Distance based regression models for proportionshelling.prop.reg ols.prop.reg
Divergence based regression for compositional datajs.compreg kl.compreg symkl.compreg tv.compreg
Divergence based regression for compositional data with compositional data in the covariates side using the alpha-transformationkl.alfapcr
Divergence matrix of compositional datadivergence
Energy test of equality of distributions using the alpha-transformationaeqdist.etest
Estimating location and scatter parameters for compositional datacomp.den
Estimation of the probability left outside the simplex when using the alpha-transformationprobout
Estimation of the value of alpha in the folded modela.est
Estimation of the value of alpha via the alfa profile log-likelihoodalfa.profile
Fast estimation of the value of alphaalfa.tune
Gaussian mixture models for compositional datamix.compnorm
Gaussian mixture models for compositional data using the alpha-transformationalfa.mix.norm
Generalised Dirichlet random values simulationrgendiri
Generate random folds for cross-validationmakefolds
Greenacre's power transformationgreen
Helper Frechet mean for compositional datafrechet2
Helper functions for the Kullback-Leibler regressionkl.compreg2 klcompreg.boot
Hypothesis testing for two or more compositional mean vectorscomp.test
ICE plot for projection pursuit regression with compositional predictor variablesice.pprcomp
ICE plot for the alpha-k-NN regressionice.aknnreg
ICE plot for the alpha-kernel regressionice.akernreg
ICE plot for univariate kernel regressionice.kernreg
Inverse of the alpha-transformationalfainv
Kernel regression with a numerical response vector or matrixkern.reg
Kullback-Leibler divergence and Bhattacharyya distance between two Dirichlet distributionskl.diri
LASSO Kullback-Leibler divergence based regressionlasso.klcompreg
LASSO log-ratio regression with compositional responselasso.compreg
LASSO with compositional predictors using the alpha-transformationalfa.lasso
Log-contrast GLMS with compositional predictor variableslc.glm
Log-contrast logistic or Poisson regression with with multiple compositional predictorslc.glm2
Log-contrast quantile regression with compositional predictor variableslc.rq
Log-contrast quantile regression with with multiple compositional predictorslc.rq2
Log-contrast regression with compositional predictor variableslc.reg
Log-contrast regression with multiple compositional predictorslc.reg2
Log-likelihood ratio test for a Dirichlet mean vectordirimean.test
Log-likelihood ratio test for a symmetric Dirichlet distributionsym.test
Minimized Kullback-Leibler divergence between Dirichlet and logistic normalkl.diri.normal
Mixture model selection via BICbic.mixcompnorm
Mixture model selection with the alpha-transformation using BICbic.alfamixnorm
MLE for the multivariate t distributionmultivt
MLE of distributions defined in the (0, 1) intervalbeta.est hsecant01.est ibeta.est kumar.est logitnorm.est unitweibull.est zilogitnorm.est
MLE of the a Dirichlet distributiondiri.est
MLE of the Dirichlet distribution via Newton-Rapshondiri.nr
MLE of the folded model for a given value of alphaa.mle alpha.mle
MLE of the zero adjusted Dirichlet distributionzad.est
Multivariate kernel density estimationmkde
Multivariate kernel density estimation for compositional datacomp.kern
Multivariate linear regressionmultivreg
Multivariate normal random values simulation on the simplexrcompnorm
Multivariate or univariate regression with compositional data in the covariates side using the alpha-transformationalfa.pcr
Multivariate regression with compositional datacomp.reg
Multivariate skew normal random values simulation on the simplexrcompsn
Multivariate t random values simulation on the simplexrcompt
Naive Bayes classifiers for compositional datacomp.nb
Naive Bayes classifiers for compositional data using the alpha-transformationalfa.nb
Non linear least squares regression for compositional dataols.compreg
Non-parametric zero replacement strategieszeroreplace
Permutation linear independence test in the SCLS modelscls.indeptest
Permutation linear independence test in the TFLR modeltflr.indeptest
Permutation test for the matrix of coefficients in the SCLS modelscls.betest
Permutation test for the matrix of coefficients in the TFLR modeltflr.betest
Perturbation operationperturbation
Plot of the LASSO coefficientslassocoef.plot
Power operationpow
Principal component analysislogpca
Principal component analysis using the alpha-transformationalfa.pca
Principal component generalised linear modelsglm.pcr
Principal coordinate analysis using the alpha-distancealfa.mds
Principal coordinate analysis using the Jensen-Shannon divergenceesov.mds
Projection pursuit regression for compositional datacomp.ppr
Projection pursuit regression with compositional predictor variablespprcomp
Projection pursuit regression with compositional predictor variables using the alpha-transformationalfa.pprcomp
Projections based test for distributional equality of two groupsdptest
Proportionality correlation coefficient matrixpcc
Quasi binomial regression for proportionspropreg propregs
Random values generation from some univariate distributions defined on the (0,1) intervalrbeta1 rlogitnorm runitweibull
Read a file as a Filebacked Big Matrixread.fbm
Regression with compositional data using the alpha-transformationalfa.reg alfa.reg2 alfa.reg3
Regularised and flexible discriminant analysis for compositional data using the alpha-transformationalfa.fda alfa.rda
Ridge regressionridge.reg
Ridge regression plotridge.plot
Ridge regression with compositional data in the covariates side using the alpha-transformationalfa.ridge
Ridge regression plotalfaridge.plot
Simplicial constrained median regression for compositional responses and predictorsscrq
Simulation of compositional data from Gaussian mixture modelsrmixcomp
Simulation of compositional data from mixtures of Dirichlet distributionsrmixdiri
Simulation of compositional data from the Flexible Dirichlet distributionrfd
Simulation of compositional data from the folded model normal distributionrfolded
Spatial median regressionspatmed.reg
Ternary diagramternary
Ternary diagram of regression modelsternary.reg
Ternary diagram with confidence region for the matrix of coefficients of the SCLS or the TFLR modelternary.coefcr
Ternary diagram with confidence region for the meanternary.mcr
Ternary diagram with the coefficients of the simplicial-simplicial regression modelsternary.coef
The additive log-ratio transformation and its inversealr alrinv
The alpha-distancealfadist alfadista
The alpha-IT transformationait
The alpha-IT-distanceaitdist aitdista
The alpha-k-NN regression for compositional response dataaknn.reg
The alpha-k-NN regression with compositional predictor variablesalfa.knn.reg
The alpha-kernel regression with compositional response dataakern.reg
The alpha-SCLS model for compositional responses and predictorsascls
The alpha-TFLR model for compositional responses and predictorsatflr
The alpha-transformationalef alfa
The Box-Cox transformation applied to ratios of componentsbc
The ESOV-distancees esov esova
The folded power transformationfp
The Frechet mean for compositional datafrechet
The Helmert sub-matrixhelm
The k-nearest neighbours using the alpha-distancealfann
The k-NN algorithm for compositional dataait.knn alfa.knn comp.knn
The multiplicative log-ratio transformation and its inversemlr mlrinv
The pivot coordinate transformation and its inversepivot pivotinv
Simplicial constrained linear least squares (SCLS) for compositional responses and predictorsscls
The SCLS model with multiple compositional predictorsscls2
The TFLR model with multiple compositional predictorstflr2
Transformation-free linear regression (TFLR) for compositional responses and predictorstflr
Total variabilitytotvar
Tuning of the alpha-generalised correlations between two compositional datasetsacor.tune
Tuning of the bandwidth h of the kernel using the maximum likelihood cross validationmkde.tune
Tuning of the divergence based regression for compositional data with compositional data in the covariates side using the alpha-transformationklalfapcr.tune
Tuning of the k-NN algorithm for compositional dataaitknn.tune alfaknn.tune compknn.tune
Tuning of the projection pursuit regression for compositional datacompppr.tune
Tuning of the projection pursuit regression with compositional predictor variablespprcomp.tune
Tuning of the projection pursuit regression with compositional predictor variables using the alpha-transformationalfapprcomp.tune
Tuning the number of PCs in the PCR with compositional data using the alpha-transformationalfapcr.tune
Tuning the principal components with GLMsglmpcr.tune multinompcr.tune pcr.tune
Tuning the value of alpha in the alpha-regressionalfareg.tune
Two-sample test of high-dimensional means for compositional datahd.meantest2
Unconstrained GLMs with compositional predictor variablesulc.glm
Unconstrained linear regression with compositional predictor variablesulc.reg
Unconstrained linear regression with multiple compositional predictorsulc.reg2
Unconstrained logistic or Poisson regression with multiple compositional predictorsulc.glm2
Unconstrained quantile regression with compositional predictor variablesulc.rq
Unconstrained quantile regression with multiple compositional predictorsulc.rq2
Unit-Weibull regression models for proportionsunitweib.reg
Zero adjusted Dirichlet regressionzadr zadr2