I am trying to run some quantile regressions with the rq()
function in the quantreg
package. I have set up my data and created models etc (following the instructions on another site) and it all look good. See below; RE
and WTPC
are continuous variables and Armored
is define below.
# Convert Treatment to 1/0 Binary factor where Armored=1
Armored<-as.numeric(Treatment=="A")
# Define variables
Y<-WTPC
X<-cbind(RE,Armored)
# Quantile Regression @ 25th
QR25<-rq(Y~X,tau=0.25)
summary(QR25)
However when I call summary()
of the rq()
model I get this
> summary(QR25)
Call: rq(formula = Y ~ X, tau = 0.25)
tau: [1] 0.25
Coefficients:
coefficients lower bd upper bd
(Intercept) 11.09456 9.34170 18.22058
XRE -1.81530 -3.46350 -0.78062
XArmored -3.68480 -14.29227 -0.74389
This is nice information and all but I want the standard errors, p-values etc like in a normal linear regression. I checked the documentation and other examples and it looks like this is the way to do this. Make a model (QR25
) and then call summary(QR25)
and that should give you the regression output with errors and p-values.
This is my first attempt at quantile regression so maybe I am missing an earlier step or need to specify something else. Any thoughts? I am running this in RStudio Version 0.98.501.