R quantreg - get effect at each level of a covariate

205 views Asked by At

I have a quantile regression that I'm running in the quantreg package of R as below:

read19 <- rq(comppercentile~q19*mothered+ethnicity+gender,tau=.5,data=medmodel)

q19 is quantitative and mothered is a 2 level factor.

Once I get a significant interaction between q19 and mothered, how do I get the effect of q19 at each level of mothered?

1

There are 1 answers

1
IRTFM On

Add -1 at the end of your formula:

read19 <- rq(comppercentile~q19*mothered+ethnicity+gender -1, tau=.5, data=medmodel)

With your current formula, you are getting an estimate for your base "mothered" level except it is labeled as "Intercept".