ARBIMETRA LAB
Quantile Regression
Estimates how a chosen conditional quantile, such as the median, depends on the variables.
What it does
Estimates how a chosen conditional quantile, such as the median, depends on the variables.
Use it when effects differ across the distribution, or outliers affect OLS.
Data you need
- Dependent variable
- Independent variables
Supported data: Numeric. Level: Advanced.
Formula and method
min Σ ρτ(yᵢ − xᵢ′b), ρτ(u) = u(τ − 1[u<0])
The model minimises an asymmetric absolute loss that weights positive and negative residuals by τ and 1 − τ. Iteratively reweighted least squares finds the solution, and standard errors use a kernel estimate of the error density.
Assumptions
- The conditional quantile is linear in the variables
Input checks
- Quantile between 0.01 and 0.99
- Perfect collinearity is rejected
How to read the result
Each coefficient is the change in that quantile for a one-unit change in the variable.
Worked example
Illustrative run on Simulated study data (teaching data). These figures are the actual output of this model on that example, and they say nothing about your own data.
- experience: coefficient 1.4521, p = <0.0001. Pseudo R² = 0.4864.
- The coefficient on experience is statistically significant at the 5% level.
Limitations
- Standard errors are large-sample approximations
Numerical validation
Validated 14 of 14 automated checks passed, including numerical results, invalid input, missing values, small samples, constant variables, charts and the interpretation text.
| Check | Reference | Result | Abs. error | Tolerance | Source |
|---|---|---|---|---|---|
| Check loss against linear program (τ = 0.5) | 87.32698232 | 87.32698271 | 3.9e-7 | 1e-5 | SciPy HiGHS linear program |
| Check loss against linear program (τ = 0.25) | 68.43762585 | 68.43762587 | 2.6e-8 | 1e-5 | SciPy HiGHS linear program |
Computed with python 3.13.2, numpy 2.2.5, scipy 1.14.1, pandas 2.3.3, statsmodels 0.14.4, scikit-learn 1.7.0, in your browser. A passing check confirms the listed comparison only. It does not make any result suitable for your data, and it is not a claim of equivalence with other statistical software.
Questions
How is this different from OLS?
OLS models the conditional mean. Quantile regression models a chosen point of the distribution, such as the median.
ARBIMETRA LAB is an educational and research tool. Results should be checked by the researcher and are not professional advice.
