Skip to main content

Plot a cumulative-incidence VPC

Description

Draws each cause’s observed cumulative incidence over its replicate band from [ferx_vpc_cif](ferx_vpc_cif.qmd), one panel per stratum and cause, with base graphics; optionally also each stratum’s all-cause Kaplan-Meier curve over its band. The curves are right-continuous steps, and so are the bands: the band at grid time t[k] holds until t[k + 1]. A panel with no band at any time says so.

Usage

# S3 method for ferx_vpc_cif
plot(x, y = NULL, cmts = NULL, survival = FALSE, ...)

Arguments

  • x: A ferx_vpc_cif object.
  • y: Unused.
  • cmts: The causes to draw; NULL (default) for every cause.
  • survival: TRUE to add one panel per stratum with the all-cause survival and its band.
  • ...: Passed to graphics::plot().

Value

x, invisibly.

Examples

ex <- ferx_example("tte_competing_risks")
cv <- ferx_vpc_cif(ex$model, ex$data, n_sim = 50L, seed = 1L)
plot(cv, cmts = 2)