gg_ajsurvplot2: Plot 2 Aalen-Johansen curves with ggplot for competing risks

gg_ajsurvplot2R Documentation

Plot 2 Aalen-Johansen curves with ggplot for competing risks

Description

Extend ggsurvfit functionality to plot competing risk curve, with main risk and competing risk in one plot

Usage

gg_ajsurvplot2(
  formula,
  data,
  weights,
  subset,
  na.action,
  main.event,
  competing.event,
  facet.by = ~strata,
  count,
  id,
  timefix,
  ...,
  .return_data = FALSE
)

Arguments

formula

A standard model formula, with survival on the left and covariates on the right

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model

weights, subset, na.action, count, id, timefix

parameter passed to finegray model. See finegray,

main.event, competing.event

main and competing event to plot

facet.by

formula. default to all strata

...

optional parameters passed to ggsurvplot.

.return_data

[FALSE] if TRUE, get the data instead.


oucru-biostats/C306 documentation built on July 16, 2024, 2:33 p.m.