Log-contrast quantile regression with compositional predictor variables {Compositional}R Documentation

Log-contrast quantile regression with compositional predictor variables

Description

Log-contrast quantile regression with compositional predictor variables.

Usage

lc.rq(y, x, z = NULL, tau, xnew = NULL, znew = NULL)

Arguments

y

A numerical vector containing the response variable values.

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).

tau

The quantile to be estimated, a number between 0 and 1.

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 quantile regression model. 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 with the constraint that the sum of the regression coefficients equals 0. If you want the regression without the zum-to-zero contraints see ulc.rq. Extra predictor variables are allowed as well, for instance categorical or continuous.

Value

A list including:

mod

The object as returned by the function quantreg::rq(). This is useful for hypothesis testing purposes.

be

The constrained regression coefficients. Their sum (excluding the constant) equals 0.

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.

Koenker R. W. and Bassett G. W. (1978). Regression Quantiles, Econometrica, 46(1): 33–50.

Koenker R. W. and d'Orey V. (1987). Algorithm AS 229: Computing Regression Quantiles. Applied Statistics, 36(3): 383–393.

See Also

lc.rq2, ulc.rq

Examples

y <- rnorm(150)
x <- rdiri(150, runif(3, 1, 4) )
mod1 <- lc.rq(y, x)

[Package Compositional version 6.9 Index]