View source: R/A2_aux_functions.R
| plot.ctqr | R Documentation | 
Plots quantile regression coefficients 
\beta(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 \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.
Paolo Frumento paolo.frumento@unipi.it
ctqr
  
  # 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) 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.