BRACE-intro

library(knitr)
library(BRACE)
#> Loading required package: survival
#> Loading required package: survminer
#> Loading required package: ggplot2
#> Loading required package: ggpubr
#> 
#> Attaching package: 'survminer'
#> The following object is masked from 'package:survival':
#> 
#>     myeloma

Introduction

The purpose of the BRACE function is to estimate and correct for certain forms of treatment selection bias arising in observational competing risks data. The function will fit Cox models for primary event(s), competing event(s), and the combined event, adjusting for confounders, following the BRACE method described in Williamson, Casey W., et al. (2022) to adjust for bias from unmeasured confounders. Results are presented in the output of $Summary table. The Cox models for primary, competing and combined endpoint, adjusting for measured confounders, are given as “Adjusted Primary Event”, “Adjusted Competing Event”, and “Adjusted Combined Event”. The proposed adjusted estimate using the BRACE method is given as “BRACE Estimate”, with a bootstrapped confidence interval.

The function allows for two alternative methods for adjusting for the effects of measured confounders. One way is using multivariable Cox proportional hazards regression models. The other way is using propensity score (PS) models. For the PS method, we first estimate the propensity scores by modeling the treatment assignment with all the measured confounders through logistic regression. The propensity scores are then applied as weights to the regression models to make the patients in each group have similar distributions. Note that applying the PS method may not be sufficient to adjust for residual unmeasured confounding, which can be detected following competing event analysis. Thus, the BRACE estimate can be called even after PS adjustment. To apply BRACE method, the treatment should have an apparent benefit in reducing the hazard for competing events. Thus, if the estimate of the treatment effect on hazard for the competing event(s) is non-negative, we do not suggest using this method.

The inference of the BRACE estimator is based on non-parametric bootstrap. B denotes the bootstrap sample size, with a default set to 1000. Users can reduce this number if it is computationally inefficient, but we recommend a large enough B to ensure the bootstrap consistency. The confidence interval is obtained from (2.5%, 97.5%) quantile of the bootstrap samples. $BRACE HR Distribution outputs B bootstrap estimates.

Estimates of the cumulative baseline omega (relative hazard) function, omega_0, can be obtained by $Omega Estimate. This is the relative cumulative hazards for primary event(s) vs. the combined event at baseline. The approach assumes that omega_0 is approximately invariant to time (including, if applicable, any time-dependent covariates). For the convenience of assumption validity checking and sensitivity analysis, we provide a time-dependent omega_0 curve given by $omega curve.

The bias (epsilon) is given as (see Williamson, Casey W., et al (2022) for details):

e = (1 − ω0)(Θ2 − E(Θ̂2)) ≥ (1 − ω0)(1 − E(Θ̂2)).

After BRACE adjustment, the estimate of epsilon is (1 − ω0)(1 − E(Θ̂2)), and can be obtained from $epsilon.

Run a toy example of brace function

We generate a toy data by gendat2 function and run the brace function to get our BRACE estimator.

The toy data is generated by

  1. the BRACE estimator based on adjusting for the effects of measured confounders through multivariable Cox proportional hazards regression models
braceoutput = brace(ftime, fstatus, covs, trt, PS=0, B=200)
braceoutput$Summary
#>                          HR Estimate Lower 95% CI Upper 95% CI
#> BRACE Estimate             0.7935949    0.7201575    0.8738840
#> Adjusted Combined Event    0.6024887    0.5198453    0.6982704
#> Adjusted Primary Event     0.6158594    0.5014621    0.7563540
#> Adjusted Competing Event   0.5884810    0.4760827    0.7274154
braceoutput$`Omega Curve`

  1. the BRACE estimator based on adjusting for the effects of measured confounders through using propensity score (PS) models
braceoutput = brace(ftime, fstatus, covs, trt, PS=1, B=200)
braceoutput$Summary
#>                          HR Estimate Lower 95% CI Upper 95% CI
#> BRACE Estimate             0.8079946    0.7372978    0.8884868
#> Adjusted Combined Event    0.6230656    0.5348480    0.7258339
#> Adjusted Primary Event     0.6182452    0.5006971    0.7633898
#> Adjusted Competing Event   0.6282181    0.5082126    0.7765608
braceoutput$`Omega Curve`