SPSS command: SPSS QUANTILE REGRESSION
Quantile regression for medians and percentiles
Quantile regression models a chosen percentile of the outcome — the median, the 10th or the 90th — instead of the mean, so it is robust to outliers and shows whether predictors affect the low end, the middle and the high end differently.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS QUANTILE REGRESSION procedure on your device for up to nine quantiles at once, with an exact linear-programming fit, i.i.d. or sandwich standard errors and pseudo R².
- How each predictor shifts a given percentile of the outcome, with standard errors, t tests and confidence intervals.
- Whether effects differ across the distribution — slopes that grow with the quantile mean the predictor widens the spread.
- How well each quantile model fits: pseudo R² against the intercept-only fit at the same quantile and the mean absolute error.
When to use it
Use it when
- Skewed outcomes such as income, spend, salaries or response times, where the median is more meaningful than the mean.
- Outliers in the outcome that would pull an OLS line.
- Questions about the tails, such as what drives the slowest 10% of delivery times or the top 10% of salaries.
Use something else when
- You need the mean, for example to forecast totals: linear regression estimates the conditional mean.
- Very small samples and extreme quantiles (such as 0.01 with 50 cases): there is too little data in the tail.
- Outliers in the predictors rather than the outcome: quantile regression is robust to outlying Y, not to high-leverage X values.
How to run it in Crosstabs
- 01
Choose Quantile regression
Open your data in Statistics mode and, in the Regression group, pick Quantile regression (QUANTILE REGRESSION).
- 02
Set the target and quantiles
Choose the Target variable and type Quantiles (comma-separated) strictly between 0 and 1, for example 0.25, 0.5, 0.75 (up to nine).
- 03
Add predictors
Tick categorical predictors under Factors and numeric ones under Covariates.
- 04
Choose the standard errors and run
Under Estimation keep Include intercept, tick Assume errors are independent and identically distributed for sparsity-based SEs or untick it for the sandwich estimator, choose the Bandwidth (Bofinger or Hall-Sheather) and Confidence level (%), then click Run.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
120 synthetic employees with 0–20 years of tenure; salary (thousand) = 40 + 1.2·tenure plus noise whose spread widens with tenure (fixed seed). Target variable = salary, Covariates = tenure, Quantiles = 0.1, 0.5, 0.9, with the i.i.d. assumption unticked (Bofinger bandwidth).
| Quantile | Pseudo R Squared | Mean Absolute Error |
|---|---|---|
| 0.100 | 0.000 | 16.736 |
| 0.500 | 0.160 | 8.944 |
| 0.900 | 0.372 | 15.273 |
| Parameter | Coefficient | Std. Error | Sig. | Lower Bound | Upper Bound |
|---|---|---|---|---|---|
| (Intercept) | 36.405 | 1.457 | <.001 | 33.519 | 39.291 |
| tenure | −0.055 | 0.261 | .834 | −0.571 | 0.462 |
| Parameter | Coefficient | Std. Error | Sig. | Lower Bound | Upper Bound |
|---|---|---|---|---|---|
| (Intercept) | 38.819 | 1.550 | <.001 | 35.751 | 41.888 |
| tenure | 1.361 | 0.193 | <.001 | 0.979 | 1.744 |
| Parameter | Coefficient | Std. Error | Sig. | Lower Bound | Upper Bound |
|---|---|---|---|---|---|
| (Intercept) | 43.497 | 1.923 | <.001 | 39.688 | 47.306 |
| tenure | 2.185 | 0.282 | <.001 | 1.626 | 2.743 |
Standard errors allow non-identically distributed errors (Hendricks–Koenker sandwich, Bofinger bandwidth).
How to read it
Tenure barely moves the 10th percentile (slope −0.055, p = .834) but raises the median by 1.361 and the 90th percentile by 2.185 per year (p < .001). Slopes that grow across quantiles mean tenure widens the salary distribution as well as shifting it — something a single least-squares slope would average away. Because the spread changes with tenure, the standard errors use the non-i.i.d. (sandwich) estimator.
Output tables explained
- Model Quality
- For each quantile: pseudo R² (one minus the check-function objective relative to the intercept-only model) and the mean absolute error.
- Parameter Estimates (quantile q)
- One table per quantile: coefficient, standard error, t, df, significance and confidence interval; the footnote names the standard-error method and bandwidth.
Assumptions and notes
- The chosen quantile is a linear function of the predictors; the effects may differ between quantiles.
- Observations are independent. The i.i.d. option additionally assumes the error distribution has the same shape for every case; untick it when the spread changes with the predictors.
- Enough cases near each requested quantile for the sparsity (density) estimate behind the standard errors.
How the results are validated
Quantile regression is checked against R quantreg::rq with the Barrodale–Roberts method at τ = 0.25, 0.5 and 0.9 with a factor and a covariate: coefficients agree within 1e-8, i.i.d. standard errors (an R implementation of SPSS's sparsity formula with the Bofinger bandwidth) within 1e-8, Hendricks–Koenker sandwich standard errors with the Hall–Sheather bandwidth within 1e-5, and pseudo R² and mean absolute error within 1e-9. Validation evidence
Questions
How is the median regression slope interpreted?
A slope of 1.4 at quantile 0.5 means the median of the outcome rises by 1.4 for a one-unit increase in the predictor, holding the others fixed. It says nothing about the mean.
Should I tick the i.i.d. assumption?
Tick it only when the residual spread looks the same across the predictors. If slopes differ a lot between quantiles, the errors are not identically distributed, so untick it to get the Hendricks–Koenker sandwich standard errors.
Bofinger or Hall-Sheather bandwidth?
Both set how wide a window of residuals is used to estimate the density at the quantile. Hall-Sheather gives a narrower window and is often preferred for confidence intervals; Bofinger is the panel default. Results usually differ little with moderate samples.
Why is pseudo R² so low at extreme quantiles?
Pseudo R² compares the check-function loss with an intercept-only model at the same quantile. If a predictor barely moves that percentile, the model gains little there even when it matters elsewhere in the distribution.
Related procedures
- Linear RegressionREGRESSION
- Weight Estimation (WLS)WLS
- Mann-Whitney U TestNPAR TESTS /M-W
- ExploreEXAMINE
- BootstrappingBOOTSTRAP
- Free SPSS alternative: full coverage list
Run Quantile Regression on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.