Zero adjusted Dirichlet regression
Zero adjusted Dirichlet regression.
zadr(y, x, xnew = NULL, tol = 1e-05) mixreg(param, z)
y |
A matrix with the compositional data (dependent variable). The number of observations with at least one zero value should not 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. |
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.
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). |
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
Tsagris M. and Stewart C. (2018). A Dirichlet Regression Model for Compositional Data with Zeros. Accepted at the Lobachevskii Journal of Mathematics.
Preprint available from https://arxiv.org/pdf/1410.5011.pdf
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.