1

I am plotting regression summaries for a quantile regression I did with quantreg. Obviously the method plot.summary.rqs is in use here. The problem is that is use quite a few explanatory variables each of which are displayed in the plot. Most of the coefficients behave not significantly different from OLS, so I just want to pick out and display a few of them.

How can I select the plots that I need to show? I am using knitr for my reports but do not want to show dozens of variables (and you get there quickly using dummies). Is there a way to cherry pick?

lmo
  • 37,904
  • 9
  • 56
  • 69
Matt Bannert
  • 27,631
  • 38
  • 141
  • 207

1 Answers1

1

By default, plot.summary.rqs plots all coefficients:

library(quantreg)
data(stackloss)

myrq <- rq(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., tau = seq(0.35, 0.65, 0.1), data=stackloss)
plot(summary(myrq)) # Plots all 4 coefficients

To cherry pick coefficients, the parm argument can be used:

plot(summary(myrq), parm = 2) # Plot only second regressor (Air.Flow)
plot(summary(myrq), parm = "Water.Temp") # Plot only Water.Temp
plot(summary(myrq), parm = 3:4) # Plot third and fourth regressor
CL.
  • 14,577
  • 5
  • 46
  • 73