plot.ctqr: Plot Quantile Regression Coefficients

Description Usage Arguments Details Author(s) See Also Examples

View source: R/A2_aux_functions.R

Description

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

Usage

1
2
## S3 method for class 'ctqr'
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 β(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

ctqr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  
  # 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) 

Example output

Loading required package: survival
Loading required package: pch

ctqr documentation built on Feb. 2, 2021, 1:06 a.m.