Positive and unit sum constrained quantile regression {consrq} | R Documentation |
Positive and unit sum constrained quantile regression
Description
Positive and unit sum constrained quantile regression.
Usage
pcrq(y, x, tau = 0.5)
mpcrq(y, x, tau = 0.5)
Arguments
y |
The response variable. For the pcrq() a numerical vector with observations, but for the mpcrq() a numerical matrix. |
x |
A matrix with independent variables, the design matrix. |
tau |
The quantile(s) to be estimated, a number strictly between 0 and 1. It a vector of values between 0 and 1; in this case an object of class "rqs" is returned containing among other things a matrix of coefficient estimates at the specified quantiles. |
Details
The constraint is that all beta coefficients are positive and sum to 1. That is,
i.e. min \sum_{i=1}^n(y_i-\bm{x}_i^\top\bm{\beta})^2
such that \beta_j \geq 0
and \sum_{j=1}^d\beta_j=1
. The pcrq() function performs a single regression model, whereas the mpcrq() function performs a regression for each column of y. Each regression is independent of the others.
Value
A list including:
be |
A numerical matrix with the positively constrained beta coefficients. |
mae |
A numerical vector with the mean absolute error. |
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
See Also
Examples
x <- as.matrix( iris[1:50, 1:4] )
y <- rnorm(50)
pcrq(y, x)