# Simulate data
set.seed(1234)
D <- simulateData(n = 100, gamma = 0.5, sigma.y = "1 + 2 * pmax(X, 0)")
# Quantile regressions at different levels
tau <- c(0.1, 0.25, 0.5, 0.75, 0.9)
mod <- quantreg::rq(y ~ X + Z1, tau = tau, data=D)
# Closed testing
res <- closedTesting(mod, X = "X")
res
# Summary and plot
summary(res, alpha = 0.1)
plot(res, alpha = 0.1, legend.position = "bottomright")
Run the code above in your browser using DataLab