Skip to contents

QuantileRegressionLp: Koenker-Bassett regression quantile by the two-phase simplex. SpatialQuantileIv: Kim-Muller two-stage quantile regression of the spatial autoregressive model. Identical to the Python arm morie.fn.spquant.

Usage

QuantileRegressionLp(y, X, tau = 0.5)

SpatialQuantileIv(y, X, W, tau = 0.5, Z = NULL)

Arguments

y

Response.

X

Regressors (with the intercept for QuantileRegressionLp, without it for SpatialQuantileIv).

tau

Quantile.

W

Spatial weights.

Z

Optional instruments (without intercept).

Value

A list.

References

Koenker, R. and Bassett, G. (1978). Regression quantiles. Econometrica 46, 33-50.

Kim, T.-H. and Muller, C. (2004). Two-stage quantile regression when the first stage is based on quantile regression. Econometrics Journal 7, 218-231.

Examples

QuantileRegressionLp(c(1, 3, 2, 5, 4), cbind(1, 0:4))$coefficients
#> [1] 1.00 0.75