## models.QuantileRegression


Linear quantile regression, as R's `quantreg::rq`: minimises the


Usage

``` python
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's `hs = TRUE`) or `"bofinger"`.


## Examples

``` python
>>> 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()](#bootstrap_covariance) | The paired bootstrap covariance of the coefficients, a list of rows: |
| [fit()](#fit) | Fits on [design](models.Coding.md#prospicio.models.Coding.design) (its offset is subtracted from `y` and its |
| [fit_many()](#fit_many) | One fit for each [tau](esg.Svensson.md#prospicio.esg.Svensson.tau) in [taus](models.QuantileFits.md#prospicio.models.QuantileFits.taus). |

------------------------------------------------------------------------


#### bootstrap_covariance()


The paired bootstrap covariance of the coefficients, a list of rows:


Usage

``` python
bootstrap_covariance(design, y, n_boot=200, seed=0)
```


`n_boot` resamples of the rows, each refitted, resample [b](pricing.Mbbefd.md#prospicio.pricing.Mbbefd.b) from stream [b](pricing.Mbbefd.md#prospicio.pricing.Mbbefd.b) of [seed](aggregate.EventSet.md#prospicio.aggregate.EventSet.seed).


------------------------------------------------------------------------


#### fit()


Fits on [design](models.Coding.md#prospicio.models.Coding.design) (its offset is subtracted from `y` and its


Usage

``` python
fit(design, y)
```


prior weights weight the loss).


##### Returns


`QuantileFit`  


------------------------------------------------------------------------


#### fit_many()


One fit for each [tau](esg.Svensson.md#prospicio.esg.Svensson.tau) in [taus](models.QuantileFits.md#prospicio.models.QuantileFits.taus).


Usage

``` python
fit_many(taus, design, y)
```


##### Returns


`QuantileFits`
