Fitted by iteratively reweighted least squares on the pinball loss
with a fixed iteration count and a fixed smoothing floor – no
convergence test, so both arms take identical steps. An intercept is
added to x.
Usage
morie_quantreg(x, y, q, iters = 25L)
Arguments
- x
matrix of feature rows
- y
responses
- q
the quantile level, in (0, 1)
- iters
number of IRLS sweeps
Value
list(beta, fitted, loss, q, intercept, n, p)
Examples
morie_quantreg(x = c(1, 2, 3, 4, 5, 6, 7, 8), y = c(1, 2, 3, 4, 5, 6, 7, 8), q = 0.5)
#> $beta
#> [1] 0 1
#>
#> $fitted
#> [1] 1 2 3 4 5 6 7 8
#>
#> $loss
#> [1] 0
#>
#> $q
#> [1] 0.5
#>
#> $intercept
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $p
#> [1] 2
#>