Zero adjusted Dirichlet regression {Compositional}R Documentation

Zero adjusted Dirichlet regression

Description

Zero adjusted Dirichlet regression.

Usage

zadr(y, x, xnew = NULL, tol = 1e-05)

mixreg(param, z)

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.

xnew

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

tol

A tolerance level to terminate the maximisation process.

param

Some arguments passed on to the mixreg helper function.

z

Some arguments passed on to the mixreg helper function.

Details

A zero adjusted Dirichlet regression is being fittd. 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. The function "mixreg" is a helper function and is not intended to be called directly by the user.

Value

A list including:

runtime

The time required by the regression.

loglik

The value of the log-likelihood.

phi

The precision parameter. If covariates are linked with it (function "diri.reg2"), this will be a vector.

be

The beta coefficients.

seb

The standard error of the beta coefficients.

sigma

Th covariance matrix of the regression parameters (for the mean vector and the phi parameter) in the function "diri.reg2".

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

Tsagris M. and Stewart C. (2018). A Dirichlet regression model for compositional data with zeros. Lobachevskii Journal of Mathematics,39(3): 398–412.

Preprint available from https://arxiv.org/pdf/1410.5011.pdf

See Also

zad.est, diri.reg, kl.compreg, ols.compreg, alfa.reg

Examples

x <- as.vector(iris[, 4])
y <- as.matrix(iris[, 1:3])
y <- y / rowSums(y)
mod1 <- diri.reg(y, x)
y[sample(1:450, 15) ] <- 0
mod2 <- zadr(y, x)

[Package Compositional version 5.2 Index]