quantreg

Calculating 95% confidence intervals in quantile regression in R using rq function

走远了吗. 提交于 2019-12-04 23:00:53
问题 I would like to get 95% confidence intervals for the regression coefficients of a quantile regression. You can calculate quantile regressions using the rq function of the quantreg package in R (compared to an OLS model): library(quantreg) LM<-lm(mpg~disp, data = mtcars) QR<-rq(mpg~disp, data = mtcars, tau=0.5) I am able to get 95% confidence intervals for the linear model using the confint function: confint(LM) When I use quantile regression I understand that the following code produces

Calculating 95% confidence intervals in quantile regression in R using rq function

守給你的承諾、 提交于 2019-12-03 14:05:16
I would like to get 95% confidence intervals for the regression coefficients of a quantile regression. You can calculate quantile regressions using the rq function of the quantreg package in R (compared to an OLS model): library(quantreg) LM<-lm(mpg~disp, data = mtcars) QR<-rq(mpg~disp, data = mtcars, tau=0.5) I am able to get 95% confidence intervals for the linear model using the confint function: confint(LM) When I use quantile regression I understand that the following code produces bootstrapped standard errors: summary.rq(QR,se="boot") But actually I would like something like 95%