Unconstrained log-contrast regression with compositional predictor variables {Compositional}R Documentation

Unconstrained log-contrast regression with compositional predictor variables

Description

Unconstrained log-contrast regression with compositional predictor variables.

Usage

ulc.reg(y, x, z = NULL, xnew = NULL, znew = NULL)

Arguments

y

A numerical vector containing the response variable values. This must be a continuous variable.

x

A matrix with the predictor variables, the compositional data. No zero values are allowed.

z

A matrix, data.frame, factor or a vector with some other covariate(s).

xnew

A matrix containing the new compositional data whose response is to be predicted. If you have no new data, leave this NULL as is by default.

znew

A matrix, data.frame, factor or a vector with the values of some other covariate(s). If you have no new data, leave this NULL as is by default.

Details

The function performs the unconstrained log-contrast regression model as opposed to the log-contrast regression described in Aitchison (2003), pg. 84-85. The logarithm of the compositional predictor variables is used (hence no zero values are allowed). The response variable is linked to the log-transformed data without the constraint that the sum of the regression coefficients equals 0. If you want the regression model with the zum-to-zero contraints see lc.reg. Extra predictors variables are allowed as well, for instance categorical or continuous.

Value

A list including:

be

The constrained regression coefficients. Their sum equals 0.

covbe

If covariance matrix of the constrained regression coefficients.

va

The estimated regression variance.

residuals

The vector of residuals.

est

If the arguments "xnew" and "znew" were given these are the predicted or estimated values, otherwise it is NULL.

Author(s)

Michail Tsagris.

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

References

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.

See Also

lc.reg, lcreg.aov, lc.reg2, ulc.reg2, alfa.pcr, alfa.knn.reg

Examples

y <- iris[, 1]
x <- as.matrix(iris[, 2:4])
x <- x / rowSums(x)
mod1 <- ulc.reg(y, x)
mod2 <- ulc.reg(y, x, z = iris[, 5])

[Package Compositional version 5.2 Index]