Package 'BRACE'

Title: Bias Reduction Through Analysis of Competing Events (BRACE)
Description: Adjusting the bias due to residual confounding (often called treatment selection bias) in estimating the treatment effect in a proportional hazard model, as described in Williamson et al. (2022) <doi:10.1158/1078-0432.ccr-21-2468>.
Authors: Tuo Lin [aut, cre], Jingjing Zou [aut], Loren Mell [aut]
Maintainer: Tuo Lin <[email protected]>
License: GPL (>= 3)
Version: 0.1.0
Built: 2024-11-20 06:51:49 UTC
Source: CRAN

Help Index


Bias Reduction through Analysis of Competing Events

Description

brace is used to estimate the treatment effect with adjusted confounders on the composite hazard for primary or competing events, and adjust for bias from residual confounding in non-randomized data by BRACE method

Usage

brace(
  ftime,
  fstatus,
  covs = NA,
  trt,
  failcode = 1,
  cencode = 0,
  PS = 0,
  B = 1000
)

Arguments

ftime

vector of failure/censoring times

fstatus

vector with a unique code for each failure type and a separate code for censored observations (default is primary event = 1, competing event = 2, censored = 0)

covs

matrix (nobs x ncovs) of fixed covariates. If no covariates, set covs = NA (default is NA)

trt

vector of treatment indicator (1 for treatment group)

failcode

code of fstatus that denotes the failure type of interest

cencode

code of fstatus that denotes censored observations

PS

whether to use propensity score method for adjusting the confounding effect (1 for propensity score method, default is 0)

B

bootstrap sample size for calculating the Confidence interval, default is 1000

Value

a list of class brace, with components:

$Summary

summary table of BRACE method

$`BRACE HR Distribution`

the estimated regression coefficients in each bootstrap sample

$`Omega Estimate`

estimate of relative hazards for primary events vs. combined events

$Epsilon

the estimated bias

$`Combined Endpoint Model`

the regression model for combined events

$`Primary Endpoint Model`

the regression model for primary events

$`Competing Endpoint Model`

the regression model for competing events

$`Omega Curve`

estimate of omega over time

$`Combined Endpoint Curve`

survival curve for combined events

$`Primary Endpoint Curve`

survival curve for primary events

$`Competing Endpoint Curve`

survival curve for competing events

References

Williamson, Casey W., et al. "Bias Reduction through Analysis of Competing Events (BRACE) Correction to Address Cancer Treatment Selection Bias in Observational Data." Clinical Cancer Research 28.9 (2022): 1832-1840.

Examples

nsims = 1; nobs = 1500
f = 0.5; g = 0.333; b = 8; w1 = w2 = 0.667
theta1 = 0.5; theta2 = 1; omegaplus = 1; k3 = 0.333
sim1 = gendat(nsims,nobs,f,g,b,w1,w2,omegaplus,theta1,theta2,k3)
ftime = sim1$time
fstatus = sim1$pfs_ci
covs = NA
trt = sim1$group
braceoutput = brace(ftime, fstatus, covs, trt, PS=0, B=10)

nsims = 1; nobs = 1500
f1 = f2 = 0.5; g = 0.333; b1 = 8; b2 = 4; w1 = w2 = 0.667
theta1 = 0.5; theta2 = 1; omegaplus = 1; k3 = 0.333
sim1 = gendat2(nsims,nobs,f1,f2,g,b1,b2,w1,w2,omegaplus,theta1,theta2,k3)
ftime = sim1$time
fstatus = sim1$pfs_ci
covs = sim1$factor2
trt = sim1$group
braceoutput = brace(ftime, fstatus, covs, trt, PS=1, B=10)

simulation data generating function

Description

generating the simulation data to apply in brace

Usage

gendat(nsims, nobs, f, g, b, w1, w2, omegaplus, theta1, theta2, k3)

Arguments

nsims

number of simulation datasets

nobs

number of observations for one dataset

f

parameter for generating unmeasured binary confounder

g

parameter for generating group assignment

b

confounder effect on group assignment

w1

shape parameter in generating survival time for event 1 from weibull distribution

w2

shape parameter in generating survival time for event 2 from weibull distribution

omegaplus

multiplier on the baseline hazard for event 1

theta1

multiplier on the baseline hazard for event 1

theta2

multiplier on the baseline hazard for event 2

k3

multiplier on the baseline hazard for event 2

Value

a matrix of nsims*nobs row, which consists of nsims datasets

Examples

nsims = 1; nobs = 1500
f = 0.5; g = 0.333; b = 8; w1 = w2 = 0.667
theta1 = 0.5; theta2 = 1; omegaplus = 1; k3 = 0.333
sim1 = gendat(nsims,nobs,f,g,b,w1,w2,omegaplus,theta1,theta2,k3)

simulation data generating function (Adding a measured confounder)

Description

generating the simulation data to apply in brace

Usage

gendat2(nsims, nobs, f1, f2, g, b1, b2, w1, w2, omegaplus, theta1, theta2, k3)

Arguments

nsims

number of simulation datasets

nobs

number of observations for one dataset

f1

parameter for generating unmeasured binary confounder

f2

parameter for generating measured binary confounder

g

parameter for generating group assignment

b1

unmeasured confounder effect on group assignment

b2

measured confounder effect on group assignment

w1

shape parameter in generating survival time for event 1 from weibull distribution

w2

shape parameter in generating survival time for event 2 from weibull distribution

omegaplus

multiplier on the baseline hazard for event 1

theta1

multiplier on the baseline hazard for event 1

theta2

multiplier on the baseline hazard for event 2

k3

multiplier on the baseline hazard for event 2

Value

a matrix of nsims*nobs row, which consists of nsims datasets

Examples

nsims = 1; nobs = 1500
f1 = f2 = 0.5; g = 0.333; b1 = 8; b2 = 4; w1 = w2 = 0.667
theta1 = 0.5; theta2 = 1; omegaplus = 1; k3 = 0.333
sim1 = gendat2(nsims,nobs,f1,f2,g,b1,b2,w1,w2,omegaplus,theta1,theta2,k3)