
Plot Treatment Effect Sensitivity to Unobserved Confounding
sensitivity_plot.RdCreates a plot showing how treatment effect estimates change under different assumptions about the degree of unobserved confounding, following the framework of Cinelli and Hazlett (2020).
Arguments
- estimate
Numeric. The point estimate of the treatment effect.
- se
Numeric. The standard error of the estimate.
- r2dz_x
Numeric vector. Partial R-squared of the confounder with the treatment (x-axis values to plot). Default is
seq(0, 0.3, 0.01).- r2yz_dx
Numeric vector. Partial R-squared of the confounder with the outcome. Default is
seq(0, 0.3, 0.01).- benchmark_r2
Optional named list of benchmark partial R-squared values, e.g.,
list("Age" = c(r2dz = 0.05, r2yz = 0.1)).- conf_level
Numeric. Confidence level. Default is 0.95.
- title
Character. Plot title.