Package {mziln}


Type: Package
Title: Regression for Compositional Data with Zero Values
Version: 1.0
Date: 2026-08-21
Author: Michail Tsagris [aut, cre]
Maintainer: Michail Tsagris <mtsagris@uoc.gr>
Depends: R (≥ 4.0)
Imports: rangen, Rfast, stats
Suggests: Compositional, Rfast2
Description: A multivariate zero inflated logistic normal regression model is implemented for compositional data with zero values present. The relevant paper is Li Z., Lee K., Karagas M. R., Madan J. C., Hoen A. G., O'Malley A. J. and Li H. (2018). "Conditional regression based on a multivariate zero-inflated logistic-normal model for microbiome relative abundance data", <doi:10.1007/s12561-018-9219-2>.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2026-08-21 11:41:30 UTC; mtsag
Repository: CRAN
Date/Publication: 2026-08-30 09:10:08 UTC

Regression for Compositional Data with Zero Values

Description

A multivariate zero inflated logistic normal regression model is implemented for compositional data with zero values present.

Details

Package: mziln
Type: Package
Version: 1.0
Date: 2026-08-21

Maintainers

Michail Tsagris <mtsagris@uoc.gr>.

Author(s)

Michail Tsagris mtsagris@uoc.gr

References

Li Z., Lee K., Karagas M. R., Madan J. C., Hoen A. G., O'Malley A. J. and Li H. (2018). Conditional regression based on a multivariate zero-inflated logistic-normal model for microbiome relative abundance data. Statistics in Biosciences, 10(3): 587–608.


Bootstrap for the MZILN regression model

Description

Bootstrap for the MZILN regression model.

Usage

boot.mziln(y, x, R = 1000)

Arguments

y

A matrix with the compositional data (dependent variable). The number of observations (vectors) with no zero values should be more than the columns of the predictor variables. Otherwise, the initial values will not be calculated.

x

The predictor variable(s), they can be either continnuous or categorical or both.

R

The number of bootstrap resamples to perform.

Details

The multivariate zero inflated logistic normal regression is being fitted. The likelihood conists of two components. The contributions of the non zero compositional values and the contributions of the compositional vectors with at least one zero value. The second component may have many different sub-categories, one for each pattern of zeros.

Value

A list including:

be

The bootstrapped beta coefficients.

sigma

The bootstrap estimate of the covariance matrix of the regression parameters.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Li Z., Lee K., Karagas M. R., Madan J. C., Hoen A. G., O'Malley A. J. and Li H. (2018). Conditional regression based on a multivariate zero-inflated logistic-normal model for microbiome relative abundance data. Statistics in Biosciences, 10(3): 587–608.

See Also

mziln

Examples

x <- as.vector(iris[, 4])
y <- as.matrix(iris[, 1:3])
y <- y / rowSums(y)
ind <- sample(150, 10)
for ( k in ind )  y[k, sample(3, 1)] <- 0
y <- y / rowSums(y)
mod <- boot.mziln(y, x, R = 100)

Multivariate zero inflated logistic normal regression

Description

Multivariate zero inflated logistic normal regression.

Usage

mziln(y, x, xnew = NULL)

Arguments

y

A matrix with the compositional data (dependent variable) with zero values present.

x

The predictor variable(s), they can be either continnuous or categorical or both.

xnew

If you have new data use it, otherwise leave it NULL.

Details

The conditional logistic normal regression is being fitted. The likelihood conists of two components. The contributions of the non zero compositional values and the contributions of the compositional vectors with at least one zero value. The second component may have many different sub-categories, one for each pattern of zeros.

Value

A list including:

be

The beta coefficients.

est

The fitted or the predicted values (if xnew is not NULL).

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Li Z., Lee K., Karagas M. R., Madan J. C., Hoen A. G., O'Malley A. J. and Li H. (2018). Conditional regression based on a multivariate zero-inflated logistic-normal model for microbiome relative abundance data. Statistics in Biosciences, 10(3): 587–608.

See Also

boot.mziln

Examples

x <- as.vector(iris[, 4])
y <- as.matrix(iris[, 1:3])
y <- y / rowSums(y)
ind <- sample(150, 10)
for ( k in ind )  y[k, sample(3, 1)] <- 0
y <- y / rowSums(y)
mod <- mziln(y, x)