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,
  ci = TRUE,
  monochrome = FALSE,
  type = c("alternate", "overlaid"),
  ...
)

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

ci

[TRUE] Plot confidence band?

monochrome

[FALSE] plot in monochrome? either FALSE (default) or a string of color, TRUE is equivalent to "black"

type

['alternate'] plot in alternative or overlaid style?

...

other parameters passed to finegray (excluding etype)


oucru-biostats/C306 documentation built on Sept. 1, 2024, 10:04 a.m.