| plot.ctqr {ctqr} | R Documentation |
Plots quantile regression coefficients
β(p) as a function of p,
based on a fitted model of class “ctqr”.
## S3 method for class 'ctqr' plot(x, which = NULL, ask = TRUE, ...)
x |
an object of class “ |
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 |
With this command, a plot of β(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.
Paolo Frumento paolo.frumento@unipi.it
# 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)