Skip to contents

Sensitivity analysis to explore effect of residual confounding using simple algebraic transformation (array approach). It indicates the strength of an unmeasured confounder and the necessary imbalance among exposure categories to affect the observed (crude) relative risk.

Usage

confounders.array(
  crude_risk,
  type = c("binary", "continuous", "RD"),
  bias_parms = NULL
)

Arguments

crude_risk

Crude (apparent or observed) relative risk between the exposure and the outcome. If type RD, this is the crude (observed) risk difference.

type

Choice of implementation, for binary covariates, continuous covariates, or on risk difference scale.

bias_parms

Numeric vector defining the necessary bias parameters. This vector has 3 elements, in the following order:

  1. the association between the confounder and the outcome (RR, relative risk),

  2. the prevalence of the confounder among the exposed (between 0 and 1, if type binary), or mean value of the confounder among the exposed (if type continuous or RD), and

  3. the prevalence of the confounder among the unexposed (between 0 and 1, if type binary), or mean value of the confounder among the unexposed (if type continuous or RD).

Value

A list with elements:

model

Bias analysis performed.

bias_parms

Input bias parameters.

adj_measures

Output results, with bias as a percentage: (crude_RR - risk_adj)/risk_adj * 100.

References

Schneeweiss, S., 2006. Sensitivity analysis and external adjustment for unmeasured confounders in epidemiologic database studies of therapeutics. Pharmacoepidemiol Drug Safety 15: 291-303.

Examples

# Example from Schneeweiss, S. Sensitivity analysis and external adjustment for
# unmeasured confounders in epidemiologic database studies of therapeutics.
# Pharmacoepidemiol Drug Safety 2006; 15: 291-303.
confounders.array(crude_risk = 1.5, type = "binary",
bias_parms = c(5.5, 0.5, 0.1))
#> 
#> ── Input bias parameters ──
#> 
#>                              
#> RR(Confounder-Disease):   5.5
#> p(Confounder+|Exposure+): 0.5
#> p(Confounder+|Exposure-): 0.1
#> ────────────────────────────────────────────────────────────────────────────────
#>                         
#> Adjusted RR    0.6692308
#> Percent bias 124.1379310

# Examples from Patorno E., Gopalakrishnan, C., Franklin, J.M., Brodovicz, K.G.,
# Masso-Gonzalez, E., Bartels, D.B., Liu, J., and Schneeweiss, S. Claims-based
# studies of oral glucose-lowering medications can achieve balance in critical
# clinical variables only observed in electronic health records 2017; 20(4): 974-
# 984.
confounders.array(crude_risk = 1.5, type = "binary",
bias_parms = c(3.25, 0.333, 0.384))
#> 
#> ── Input bias parameters ──
#> 
#>                                
#> RR(Confounder-Disease):   3.250
#> p(Confounder+|Exposure+): 0.333
#> p(Confounder+|Exposure-): 0.384
#> ────────────────────────────────────────────────────────────────────────────────
#>                       
#> Adjusted RR   1.598399
#> Percent bias -6.156116

confounders.array(crude_risk = 1.5, type = "continuous",
bias_parms = c(1.009, 7.8, 7.9))
#> 
#> ── Input bias parameters ──
#> 
#>                                
#> RR(Confounder-Disease):   1.009
#> p(Confounder+|Exposure+): 7.800
#> p(Confounder+|Exposure-): 7.900
#> ────────────────────────────────────────────────────────────────────────────────
#>                         
#> Adjusted RR   1.50134456
#> Percent bias -0.08955729

confounders.array(crude_risk = 0.05, type = "RD", bias_parms = c(0.009, 8.5, 8))
#> 
#> ── Input bias parameters ──
#> 
#>                                   
#> RR(Confounder-Disease):      0.009
#> mean(Confounder+|Exposure+): 8.500
#> mean(Confounder+|Exposure-): 8.000
#> ────────────────────────────────────────────────────────────────────────────────
#>                     
#> Adjusted RD  0.04550
#> Percent bias 9.89011