ctqr (version 1.0)

plot.ctqr: Plot Quantile Regression Coefficients

Description

Plots quantile regression coefficients $\beta(p)$ as a function of $p$, based on a fitted model of class “ctqr”.

Usage

"plot"(x, which = NULL, ask = TRUE, ...)

Arguments

x
an object of class “ctqr”.
which
an optional numerical vector indicating which coefficient(s) to plot. If which = NULL, all coefficients are plotted.
ask
logical. If which = NULL and ask = TRUE (the default), you will be asked interactively which coefficients to plot.
...
additional graphical parameters, that can include xlim, ylim, xlab, ylab, col, lwd. See par.

Details

With this command, a plot of $\beta(p)$ versus $p$ is created, provided that at least two quantiles have been estimated. Dashed lines represent 95% confidence intervals, while the horizontal dotted line indicates the zero.

See Also

ctqr

Examples

Run this code
  
  # using simulated data
  
  n <- 1000
  x <- runif(n)
  t <- 1 + x + rexp(n)
  c <- runif(n, 1,10)
  y <- pmin(c,t)
  d <- (t <= c)
  
  par(mfrow = c(1,2))
  plot(ctqr(Surv(y,d) ~ x, p = seq(0.05,0.95,0.05)), ask = FALSE) 

Run the code above in your browser using DataLab