Skip to contents

Estimates non-parametric Cumulative Incidence Functions (CIF) for primary clinical events (such as 30-day hospital readmission) in the presence of competing events (such as mortality).

Usage

estimate_cif(
  df_or_list,
  time_col = NULL,
  status_col = NULL,
  event_code = 1L,
  competing_code = 2L,
  alpha = 0.05
)

Arguments

df_or_list

A data.frame or output list from prepare_competing_risks_data().

time_col

Name of time column (auto-detected if NULL).

status_col

Name of status column (auto-detected if NULL).

event_code

Indicator integer for primary event (default 1L).

competing_code

Indicator integer for competing risk (default 2L).

alpha

Significance level for confidence intervals (default 0.05).

Value

A cif_result S3 object containing $cif_table and $summary.