Quantile Regression with statsmodels

preview_player
Показать описание
Quantile regression is a type of regression analysis used in statistics and econometrics. Whereas the method of least squares estimates the conditional mean of the response variable across values of the predictor variables, quantile regression estimates the conditional median (or other quantiles) of the response variable. Quantile regression is an extension of linear regression used when the conditions of linear regression are not met.

Рекомендации по теме
Комментарии
Автор

Thank you very much, you helped me a lot ! very useful .

madrariabderrahmane
Автор

Doing data.plot.scatter(x="income", y="foodexp") early on would make it obvious that you need to take the log of both variables first. When you do log vs log, you'll get quantile estimates that *do* mostly fall within the OLS confidence band.

I guess that's happening because you have a very heteroskedastic dataset, where e = kf(x) approximately: obviously the quantile slopes will vary!

Hastur
Автор

can I just ask how the code of visualizing the results part would be if you had 2 or more independent variables? thank you in advance!

Congy