plot.ctqr {ctqr} | R Documentation |
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
## S3 method for class 'ctqr'
plot(x, which = NULL, ask = TRUE, ...)
Arguments
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 |
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.
Author(s)
Paolo Frumento paolo.frumento@unipi.it
See Also
Examples
# 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)
[Package ctqr version 2.1 Index]