QCSunny Lab

Quantile Regression分位数回归

Same layout as linear regression: x columns first, the LAST column is the response. The intercept is included automatically.与线性回归相同的格式:前面是 x 列,最后一列为因变量,自动包含截距。

Least squares estimates the conditional mean; quantile regression estimates any conditional quantile (τ = 0.5 is the median) by minimising the asymmetric check loss, so a few outliers or a skewed error distribution tilt the fit far less.

The fit uses Schlossmacher's iteratively reweighted least squares with an annealed threshold: each round solves a weighted least squares problem, and the threshold shrinks tenfold so the answer converges to the exact check-loss minimiser. Pseudo-R² is Koenker–Machado's local fit measure.

Frequently asked questions

Why compare τ = 0.1 with τ = 0.9?

If the slopes differ across quantiles, the effect of x is not just shifting the distribution but changing its spread — something mean regression averages away.

Does it give standard errors?

This tool reports point estimates and pseudo-R². Inference for quantile regression needs bootstrap or kernel methods, which are a different machinery from the closed-form t tests of OLS.

中文说明

最小二乘估计条件均值;分位数回归通过最小化不对称检查损失估计任意条件分位数(τ = 0.5 即中位数),因此少数离群值或偏态误差分布对拟合的影响小得多。

拟合采用 Schlossmacher 迭代重加权最小二乘并退火阈值:每轮解一个加权最小二乘问题,阈值逐轮缩小十倍,使解收敛到检查损失的精确最小化点。伪 R² 采用 Koenker–Machado 局部拟合指标。

常见问题

为什么要对比 τ = 0.1 与 τ = 0.9?

若不同分位数的斜率不同,说明 x 不只是平移分布、还在改变离散程度——这是均值回归会平均掉的信息。

为什么没有标准误?

本工具给出点估计与伪 R²。分位数回归的推断需要自助法或核方法,与 OLS 的闭式 t 检验是两套机制。