Skip to contents

Overall, Cause Specific, and Competing Survival.

Usage

competingsurvival(
  data,
  explanatory,
  overalltime,
  outcome,
  dod,
  dooc,
  awd,
  awod,
  analysistype = "overall",
  graystest = FALSE,
  subdistribution = FALSE,
  timepoints = "12,24,36,60",
  confidencelevel = 0.95,
  showrisksets = FALSE,
  showStackedPlot = FALSE,
  showKMvsCIF = FALSE,
  cifColors = "default"
)

Arguments

data

The data as a data frame.

explanatory

.

overalltime

.

outcome

.

dod

.

dooc

.

awd

.

awod

.

analysistype

.

graystest

Perform Gray's test to compare cumulative incidence functions between groups

subdistribution

Use Fine-Gray subdistribution hazard model for competing risks regression

timepoints

Comma-separated time points (in months) for cumulative incidence estimates

confidencelevel

Confidence level for hazard ratio confidence intervals

showrisksets

Display number at risk table below cumulative incidence plot

showStackedPlot

Display stacked probability plot with all competing events

showKMvsCIF

Plot comparison between 1-KM and CIF to show competing risk bias

cifColors

Color scheme for CIF plots

Value

A results object containing:

results$todoa html
results$summarya html
results$survivalTablea table
results$cuminca table
results$comprisksPlotan image
results$stackedPlotan image
results$kmvscifPlotan image
results$interpretationa html

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$survivalTable$asDF

as.data.frame(results$survivalTable)

Examples

# \donttest{
# example will be added
# }