models.QuantileRegression
Linear quantile regression, as R’s quantreg::rq: minimises the
Usage
models.QuantileRegression()weighted check loss sum w rho_tau(y - x' beta) by an interior point on the dual, then moves to the exact vertex (rq(method = "br")’s solution when it is unique). Standard errors are Powell’s kernel sandwich, summary.rq(se = "ker").
Parameters
tau: float-
The quantile, in (0, 1).
bandwidth: str-
The kernel’s bandwidth:
"hall_sheather"(the default, as quantreg’shs = TRUE) or"bofinger".
Examples
>>> from prospicio.models import Design, QuantileRegression
>>> d = Design([[1.0] * 9], ["(Intercept)"])
>>> QuantileRegression(0.5).fit(d, [float(v) for v in range(1, 10)]).coefficients[5.0]
Methods
| Name | Description |
|---|---|
| bootstrap_covariance() | The paired bootstrap covariance of the coefficients, a list of rows: |
| fit() |
Fits on design (its offset is subtracted from y and its
|
| fit_many() | One fit for each tau in taus. |
bootstrap_covariance()
The paired bootstrap covariance of the coefficients, a list of rows:
Usage
bootstrap_covariance(design, y, n_boot=200, seed=0)fit()
Fits on design (its offset is subtracted from y and its
Usage
fit(design, y)prior weights weight the loss).
Returns
QuantileFit
fit_many()
Usage
fit_many(taus, design, y)Returns
QuantileFits