This repository shows how to estimate causal effects of an exposure on an outcome (in failure-time settings) when the cause of death is unknown.1
Estimating causal effects in the relative survival setting involves two main steps:
- Predict the probability (i.e., create weights) that an all-cause death is due to the disease of interest or other causes.
- Estimate causal effects of an exposure on an outcome using an estimator (e.g., g-formula, IPTW, etc.) from within the competing risk framework that can incorporate the weights (from Step 1).
This method can be applied for any disease-specific mortality of interest. Originally, the excess hazard model was developed as an approach to calculate net survival estimates for a sample of patients with cancer. The "excess hazard" is the additional mortality hazard of a disease of interest beyond what is expected in the general population. Thus, these weights can be applied to any disease of interest. However, careful consideration is required in terms of the causal question and whether the life tables are sufficiently stratified regarding the disease of interest.
This is an adaptation of the work by:
Young JG, Stensrud MJ, Tchetgen Tchetgen EJ, Hernán MA. A causal framework for classical statistical estimands in failure time settings with competing events. Statistics in Medicine. 2020 https://onlinelibrary.wiley.com/doi/abs/10.1002/sim.8471
The CI&RS R script contains the code to estimate causal effects (i.e., risk difference and risk ratios) using information from the relative survival setting.
The exprates.Rds data set contains the expected mortality rates from life tables that are stratified by age, sex, year, and another variable (cmb).
The Functions R script contains the necessary functions used within the "CI&RS" script:
cDataDesignOptim
2 is the function to simulate patient characteristics.cdatasimulationT1WeibOptim
2 is the function to simulate the failure time and vital status (only after simulating the patient characteristcs).calculateCumInc
3 is the function to estimate the cumulative incidence.
The Bootstrap function R script contains the bootstrap function used within the "CI&RS" script. The bootstap function calculates confidence intervals for the Risk Difference (RD) by default. If you want confidence intervals for the Relative Risk (RR), you will need to specify this using the estimand="RR" option.
Footnotes
-
This work is a collaboration between members of the Inequalities in Cancer Outcomes Network. ↩
-
Created by Aurélien Belot. ↩ ↩2
-
Written by Young et al (2020). ↩