plotSurvival {CohortSurvival}R Documentation

Plot survival results

Description

Plot survival results

Usage

plotSurvival(
  result,
  x = "time",
  xscale = "days",
  ylim = c(0, NA),
  cumulativeFailure = FALSE,
  ribbon = TRUE,
  facet = NULL,
  colour = NULL,
  colourName = NULL
)

Arguments

result

Survival results

x

Variable to plot on x axis

xscale

X axis scale. Can be "days" or "years".

ylim

Limits for the Y axis

cumulativeFailure

whether to plot the cumulative failure probability instead of the survival probability

ribbon

If TRUE, the plot will join points using a ribbon

facet

Variables to use for facets

colour

Variables to use for colours

colourName

Colour legend name

Value

A plot of survival probabilities over time

Examples


cdm <- mockMGUS2cdm()
surv <- estimateSingleEventSurvival(cdm,
                                    targetCohortTable = "mgus_diagnosis",
                                    outcomeCohortTable = "death_cohort")
plotSurvival(surv)



[Package CohortSurvival version 0.5.0 Index]