Skip to contents

Enumerates the basic solutions of Theorem 3.1 (exact fits through K observations) and returns the minimizer of the asymmetric absolute loss; exact for K <= 3 coefficients.

Usage

morie_quanrg(y, X = NULL, theta = 0.5)

Arguments

y

Numeric responses.

X

Optional regressor matrix WITHOUT intercept (added automatically); default location model = sample quantile.

theta

Quantile level in (0, 1).

Value

A list with elements coefficients, objective, basis (1-based row indices), n_bases_checked, theta, method.

References

Koenker, R. and Bassett, G. (1978). Regression quantiles. Econometrica, 46(1), 33-50. Koenker, R. (2005). Quantile Regression. Cambridge University Press.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_quanrg(V)
#> $coefficients
#> [1] 4
#> 
#> $objective
#> [1] 8
#> 
#> $basis
#> [1] 4
#> 
#> $n_bases_checked
#> [1] 8
#> 
#> $theta
#> [1] 0.5
#> 
#> $method
#> [1] "exact regression quantile (K&B 1978 Thm 3.1 bases)"
#>