Skip to contents

Without prevalence_confounder the adjustment is the Ding & VanderWeele (2016) bounding factor \(B = RR_{UD} RR_{EU} / (RR_{UD} + RR_{EU} - 1)\), the largest bias any confounder with those strengths can produce, applied toward the null. With the prevalence \(p_0\) of a binary confounder among the unexposed, rr_eu is its prevalence ratio (\(p_1 = RR_{EU} p_0\)) and the bias is Schlesselman's (1978) exact factor \((1 + (RR_{UD}-1) p_1) / (1 + (RR_{UD}-1) p_0)\).

Usage

bias_adjusted_estimate(
  estimate,
  se,
  rr_ud,
  rr_eu,
  prevalence_confounder = NULL
)

Arguments

estimate

Observed treatment effect on the log-RR scale.

se

Standard error.

rr_ud

RR linking confounder to outcome.

rr_eu

RR linking treatment to confounder.

prevalence_confounder

Optional confounder prevalence among the unexposed.

Value

Named list with adjusted_estimate, bias (log scale), adjusted_ci_lower, adjusted_ci_upper, original_estimate.

Examples

res <- bias_adjusted_estimate(0.5, 0.1, rr_ud = 2, rr_eu = 2)
res$adjusted_estimate
#> [1] 0.2123179
c(res$adjusted_ci_lower, res$adjusted_ci_upper)
#> [1] 0.01632153 0.40831433