Learn R Programming

Compositional (version 5.5)

Compositional Data Analysis

Description

Regression, classification, contour plots, hypothesis testing and fitting of distributions for compositional data are some of the functions included. 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. 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. 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. d) Tsagris M. (2015). Regression analysis with compositional data containing zero values. Chilean Journal of Statistics, 6(2):47--57. 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. . 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. . g) Tsagris M. and Stewart C. (2018). A Dirichlet regression model for compositional data with zeros. Lobachevskii Journal of Mathematics, 39(3): 398--412. . 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. . 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. . j) Tsagris M., Alenazi A. and Stewart C. (2021). Non-parametric regression models for compositional data. . k) Alenazi A. (2021). Alenazi, A. (2021). A review of compositional data analysis and recent advances. Communications in Statistics-Theory and Methods (Accepted for publication). . We further include functions for percentages (or proportions).

Copy Link

Version

Install

install.packages('Compositional')

Monthly Downloads

1,556

Version

5.5

License

GPL (>= 2)

Maintainer

Last Published

March 23rd, 2022

Functions in Compositional (5.5)

Alpha generalised correlations between two compositional datasets

\(\alpha\) generalised correlations between two compositional datasets
Tuning of the alpha generalised correlations between two compositional datasets

Tuning of the alpha generalised correlations between two compositional datasets
Contour plot of the alpha multivariate normal in S^2

Contour plot of the \(\alpha\) multivariate normal in \(S^2\)
The alpha-k-NN regression with compositional predictor variables

The \(\alpha\)-k-NN regression with compositional predictor variables
Regularised and flexible discriminant analysis for compositional data using the alpha-transformation

Regularised and flexible discriminant analysis for compositional data using the \(\alpha\)-transformation
Energy test of equality of distributions using the alpha-transformation

Energy test of equality of distributions using the \(\alpha\)-transformation
The alpha-k-NN regression for compositional response data

The \(\alpha\)-k-NN regression for compositional response data
Cross validation for the alpha-kernel regression with compositional response data

Cross validation for the \(\alpha\)-kernel regression with compositional response data
The alpha-IT transformation

The \(\alpha\)-IT transformation
Principal coordinate analysis using the alpha-distance

Principal coordinate analysis using the \(\alpha\)-distance
Cross validation for the alpha-k-NN regression with compositional response data

Cross validation for the \(\alpha\)-k-NN regression with compositional response data
Cross validation for the regularised and flexible discriminant analysis with compositional data using the alpha-transformation

Cross validation for the regularised and flexible discriminant analysis with compositional data using the \(\alpha\)-transformation
Gaussian mixture models for compositional data using the alpha-transformation

Gaussian mixture models for compositional data using the \(\alpha\)-transformation
Cross-validation for the naive Bayes classifiers for compositional data using the alpha-transformation

Cross-validation for the naive Bayes classifiers for compositional data using the \(\alpha\)-transformation
Regression with compositional data using the alpha-transformation

Regression with compositional data using the \(\alpha\)-transformation
Cross validation for the alpha-k-NN regression with compositional predictor variables

Cross validation for the \(\alpha\)-k-NN regression with compositional predictor variables
Choose the number of principal components via reconstruction error

Choose the number of principal components via reconstruction error
Tuning of the k-NN algorithm for compositional data

Tuning of the k-NN algorithm for compositional data
Tuning the value of alpha in the alpha-regression

Tuning the value of \(\alpha\) in the \(\alpha\)-regression
Contour plot of the t distribution in S^2

Contour plot of the t distribution in \(S^2\)
The alpha-transformation

The \(\alpha\)-transformation
Multivariate kernel density estimation for compositional data

Multivariate kernel density estimation for compositional data
Contour plot of the normal distribution in S^2

Contour plot of the normal distribution in \(S^2\)
Exponential empirical likelihood for a one sample mean vector hypothesis testing

Exponential empirical likelihood for a one sample mean vector hypothesis testing
Exponential empirical likelihood hypothesis testing for two mean vectors

Exponential empirical likelihood hypothesis testing for two mean vectors
Contour plot of the Dirichlet distribution in S^2

Contour plot of the Dirichlet distribution in \(S^2\)
Contour plot of the kernel density estimate in S^2

Contour plot of the kernel density estimate in \(S^2\)
MLE of the Dirichlet distribution

MLE of the a Dirichlet distribution
Naive Bayes classifiers for compositional data using the alpha-transformation

Naive Bayes classifiers for compositional data using the \(\alpha\)-transformation
Ridge regression with compositional data in the covariates side using the alpha-transformation

Ridge regression with compositional data in the covariates side using the \(\alpha\)-transformation
Greenacre's power transformation

Greenacre's power transformation
Compositional-package

Compositional Data Analysis
Principal component analysis using the alpha-transformation

Principal component analysis using the \(\alpha\)-transformation
Helper Frechet mean for compositional data

Helper Frechet mean for compositional data
Fast estimation of the value of alpha

Fast estimation of the value of \(\alpha\)
The Frechet mean for compositional data

The Frechet mean for compositional data
Two-sample test of high-dimensional means for compositional data

Two-sample test of high-dimensional means for compositional data
All pairwise additive log-ratio transformations

All pairwise additive log-ratio transformations
The k-nearest neighbours using the alpha-distance

The k-nearest neighbours using the \(\alpha\)-distance
LASSO log-ratio regression with compositional response

LASSO log-ratio regression with compositional response
Estimation of the value of alpha in the folded model

Estimation of the value of \(\alpha\) in the folded model
Tuning the number of PCs in the PCR with compositional data using the alpha-transformation

Tuning the number of PCs in the PCR with compositional data using the \(\alpha\)-transformation
ANOVA for the log-contrast regression versus the uncostrained log-contrast regression

ANOVA for the log-contrast regression versus the uncostrained log-contrast regression
Principal component analysis

Principal component analysis
Perturbation operation

Perturbation operation
LASSO Kullback-Leibler divergence based regression

LASSO Kullback-Leibler divergence based regression
Ridge regression with the alpha-transformation plot

Ridge regression plot
The Box-Cox transformation applied to ratios of components

The Box-Cox transformation applied to ratios of components
The alpha-IT-distance

The \(\alpha\)-IT-distance
Beta regression

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

MLE of distributions defined in the (0, 1) interval
The k-NN algorithm for compositional data

The k-NN algorithm for compositional data
Cross-validation for the naive Bayes classifiers for compositional data

Cross-validation for the naive Bayes classifiers for compositional data
Cross-validation for the Dirichlet discriminant analysis

Cross-validation for the Dirichlet discriminant analysis
Cross-validation for the constrained linear least squares for compositional responses and predictors

Cross-validation for the constrained linear least squares for compositional responses and predictors
Dirichlet discriminant analysis

Dirichlet discriminant analysis
Power operation

Power operation
The pivot coordinate transformation and its inverse

The pivot coordinate transformation and its inverse
Naive Bayes classifiers for compositional data

Naive Bayes classifiers for compositional data
Tuning of the projection pursuit regression for compositional data

Tuning of the projection pursuit regression for compositional data
The alpha-kernel regression with compositional response data

The \(\alpha\)-kernel regression with compositional response data
Column-wise MLE of some univariate distributions

Column-wise MLE of some univariate distributions
Density of the folded normal distribution

Density of the folded model normal distribution
Bayesian network learning with compositional data

Bayesian network learning with compositional data
Density of the Flexible Dirichlet distribution

Density of the Flexible Dirichlet distribution
Estimating location and scatter parameters for compositional data

Estimating location and scatter parameters for compositional data
Cross validation for the ridge regression with compositional data as predictor using the alpha-transformation

Cross validation for the ridge regression with compositional data as predictor using the \(\alpha\)-transformation
Hypothesis testing for two or more compositional mean vectors

Hypothesis testing for two or more compositional mean vectors
Dirichlet regression

Dirichlet regression
Contour plot of the alpha-folded model in S^2

Contour plot of the \(\alpha\)-folded model in \(S^2\)
MLE of the Dirichlet distribution via Newton-Rapshon

MLE of the Dirichlet distribution via Newton-Rapshon
Multivariate or univariate regression with compositional data in the covariates side using the alpha-transformation

Multivariate or univariate regression with compositional data in the covariates side using the \(\alpha\)-transformation
The folded power transformation

The folded power transformation
Projection pursuit regression with compositional predictor variables

Projection pursuit regression with compositional predictor variables
The Helmert sub-matrix

The Helmert sub-matrix
Density values of a mixture of Dirichlet distributions

Density values of a mixture of Dirichlet distributions
Principal component generalised linear models

Principal component generalised linear models
Cross validation for the transformation-free linear regression for compositional responses and predictors

Cross validation for the transformation-free linear regression for compositional responses and predictors
Density of compositional data from Gaussian mixture models

Simulation of compositional data from Gaussian mixture models
Tuning the principal components with GLMs

Tuning the principal components with GLMs
Density values of a Dirichlet distribution

Density values of a Dirichlet distribution
Cross validation for the ridge regression

Cross validation for the ridge regression
Fitting a Flexible Dirichlet distribution

Fitting a Flexible Dirichlet distribution
Contour plot of the Flexible Dirichlet distribution in S^2

Contour plot of the Flexible Dirichlet distribution in \(S^2\)
Cross validation for the kernel regression with Euclidean response data

Cross validation for the kernel regression with Euclidean response data
Random values generation from some univariate distributions defined on the (0,1) interval

Random values generation from some univariate distributions defined on the \((0,1)\) interval
Divergence based regression for compositional data with compositional data in the covariates side using the alpha-transformation

Divergence based regression for compositional data with compositional data in the covariates side using the \(\alpha\)-transformation
Quasi binomial regression for proportions

Quasi binomial regression for proportions
Estimation of the value of alpha via the profile log-likelihood

Estimation of the value of \(\alpha\) via the alfa profile log-likelihood
Ridge regression plot

Ridge regression plot
Hotelling's multivariate version of the 1 sample t-test for Euclidean data

Hotelling's multivariate version of the 1 sample t-test for Euclidean data
Ternary diagram

Ternary diagram
Ternary diagram of regression models

Ternary diagram of regression models
Ridge regression

Ridge regression
Simulation of compositional data from Gaussian mixture models

Simulation of compositional data from Gaussian mixture models
MLE of the folded model for a given value of alpha

MLE of the folded model for a given value of \(\alpha\)
Inverse of the alpha-transformation

Inverse of the \(\alpha\)-transformation
Kullback-Leibler divergence and Bhattacharyya distance between two Dirichlet distributions

Kullback-Leibler divergence and Bhattacharyya distance between two Dirichlet distributions
Contour plot of the Kent distribution in S^2

Contour plot of the Kent distribution in \(S^2\)
The alpha-distance

The \(\alpha\)-distance
Cross validation for some compositional regression models

Cross validation for some compositional regression models
Kernel regression with a numerical response vector or matrix

Kernel regression with a numerical response vector or matrix
Empirical likelihood for a one sample mean vector hypothesis testing

Empirical likelihood for a one sample mean vector hypothesis testing
Empirical likelihood hypothesis testing for two mean vectors

Empirical likelihood hypothesis testing for two mean vectors
Tuning of the divergence based regression for compositional data with compositional data in the covariates side using the alpha-transformation

Tuning of the divergence based regression for compositional data with compositional data in the covariates side using the \(\alpha\)-transformation
Unconstrained log-contrast regression with multiple compositional predictors

Unconstrained log-contrast regression with multiple compositional predictors
Contour plot of mixtures of Dirichlet distributions in S^2

Contour plot of mixtures of Dirichlet distributions in \(S^2\)
Contour plot of the Gaussian mixture model in S^2

Contour plot of the Gaussian mixture model in \(S^2\)
Constrained linear least squares for compositional responses and predictors

Constrained linear least squares for compositional responses and predictors
MLE of the zero adjusted Dirichlet distribution

MLE of the zero adjusted Dirichlet distribution
Unit-Weibull regression models for proportions

Unit-Weibull regression models for proportions
Zero adjusted Dirichlet regression

Zero adjusted Dirichlet regression
Non linear least squares regression for compositional data

Non linear least squares regression for compositional data
Multivariate normal random values simulation on the simplex

Multivariate normal random values simulation on the simplex
Multivariate skew normal random values simulation on the simplex

Multivariate skew normal random values simulation on the simplex
Hotelling's multivariate version of the 2 sample t-test for Euclidean data

Hotelling's multivariate version of the 2 sample t-test for Euclidean data
ICE plot for univariate kernel regression

ICE plot for univariate kernel regression
Tuning the parameters of the regularised discriminant analysis

Tuning the parameters of the regularised discriminant analysis
Non parametric zero replacement strategies

Non parametric zero replacement strategies
The additive log-ratio transformation and its inverse

The additive log-ratio transformation and its inverse
Divergence based regression for compositional data

Divergence based regression for compositional data
Helper functions for the Kullback-Leibler regression

Helper functions for the Kullback-Leibler regression
Dirichlet random values simulation

Dirichlet random values simulation
Plot of the LASSO coefficients

Plot of the LASSO coefficients
Log-contrast regression with compositional predictor variables

Log-contrast regression with compositional predictor variables
Log-contrast logistic or Poisson regression with compositional predictor variables

Log-contrast logistic or Poisson regression with compositional predictor variables
Generate random folds for cross-validation

Generate random folds for cross-validation
Mixture model selection via BIC

Mixture model selection via BIC
Mixture model selection with the alpha-transformation using BIC

Mixture model selection with the \(\alpha\)-transformation using BIC
Projection pursuit regression for compositional data

Projection pursuit regression for compositional data
Multivariate linear regression

Multivariate linear regression
MLE for the multivariate t distribution

MLE for the multivariate t distribution
Total variability

Total variability
Transformation-free linear regression for compositional responses and predictors

Transformation-free linear regression for compositional responses and predictors
Multivariate analysis of variance

Multivariate analysis of variance
Log-contrast regression with multiple compositional predictors

Log-contrast regression with multiple compositional predictors
Multivariate regression with compositional data

Multivariate regression with compositional data
Cross-validation for the LASSO Kullback-Leibler divergence based regression

Cross-validation for the LASSO Kullback-Leibler divergence based regression
Cross-validation for the LASSO log-ratio regression with compositional response

Cross-validation for the LASSO log-ratio regression with compositional response
Log-likelihood ratio test for a Dirichlet mean vector

Log-likelihood ratio test for a Dirichlet mean vector
Tuning of the bandwidth h of the kernel using the maximum likelihood cross validation

Tuning of the bandwidth h of the kernel using the maximum likelihood cross validation
Multivariate kernel density estimation

Multivariate kernel density estimation
Divergence matrix of compositional data

Divergence matrix of compositional data
The ESOV-distance

The ESOV-distance
Estimation of the probability left outside the simplex when using the alpha-transformation

Estimation of the probability left outside the simplex when using the alpha-transformation
Tuning of the projection pursuit regression with compositional predictor variables

Tuning of the projection pursuit regression with compositional predictor variables
Simulation of compositional data from the Flexible Dirichlet distribution

Simulation of compositional data from the Flexible Dirichlet distribution
Unconstrained log-contrast logistic or Poisson regression with compositional predictor variables

Unconstrained log-contrast logistic or Poisson regression with compositional predictor variables
Simulation of compositional data from the folded normal distribution

Simulation of compositional data from the folded model normal distribution
Unconstrained log-contrast regression with compositional predictor variables

Unconstrained log-contrast regression with compositional predictor variables
Principal coordinate analysis using the Jensen-Shannon divergence

Principal coordinate analysis using the Jensen-Shannon divergence
ICE plot for projection pursuit regression with compositional predictor variables

ICE plot for projection pursuit regression with compositional predictor variables
James multivariate version of the t-test

James multivariate version of the t-test
Multivariate analysis of variance (James test)

Multivariate analysis of variance (James test)
Gaussian mixture models for compositional data

Gaussian mixture models for compositional data
Distance based regression models for proportions

Distance based regression models for proportions
Proportionality correlation coefficient matrix

Proportionality correlation coefficient matrix
Regularised discriminant analysis for Euclidean data

Regularised discriminant analysis for Euclidean data
Simulation of compositional data from mixtures of Dirichlet distributions

Simulation of compositional data from mixtures of Dirichlet distributions
Multivariate t random values simulation on the simplex

Multivariate t random values simulation on the simplex
Contour plot of the skew skew-normal distribution in S^2

Contour plot of the skew skew-normal distribution in \(S^2\)
Spatial median regression

Spatial median regression
Log-likelihood ratio test for a symmetric Dirichlet distribution

Log-likelihood ratio test for a symmetric Dirichlet distribution