A Common Interface for Visualizing and Reporting Sensitivity Analyses for Unmeasured Confounding

A common interface to established sensitivity analyses for unmeasured confounding in observational studies. Results of impact threshold and robustness of inference to replacement analysis (Frank, 2000, ; Frank et al., 2013, ), partial R-squared omitted-variable bias analysis (Cinelli and Hazlett, 2020, ), E-values (VanderWeele and Ding, 2017, ), and Rosenbaum bounds for matched pairs (Rosenbaum, 2002, ) are stored in one object that keeps each framework's own parameter. Robustness curves, summary tables, and plain-language reports are available for every framework; two-parameter surfaces, the exact correlation contour, and observed-covariate benchmarks are provided where the corresponding framework defines them. Results can be computed from fitted models or matched-pair differences, or converted from the 'sensemakr', 'konfound', and 'EValue' packages, and agree with those packages.


confoundvis

R-CMD-check

confoundvis is a common interface to established sensitivity analyses for unmeasured confounding. Each framework keeps its own parameter and its own published formula. confoundvis stores the results in one object. Robustness curves, tables, and reports work for every framework; surfaces, contours, and covariate benchmarks are provided only where the framework defines them. It adds no new sensitivity parameter or measure.

Framework Source confoundvis function Agrees with
Partial R² / robustness value Cinelli & Hazlett (2020) sens_path_lm(), from_sensemakr() sensemakr
Impact threshold (ITCV) Frank (2000) itcv_lm(), from_konfound() konfound
Robustness of inference to replacement (RIR) Frank et al. (2013) rir_lm(), from_konfound(index = "RIR") konfound
E-value VanderWeele & Ding (2017) from_evalue() EValue
Rosenbaum bounds, matched pairs Rosenbaum (2002) sens_path_pairs() DOS2, sensitivity2x2xk, sensitivitymv

Common and framework-specific tools

Tool Partial R² ITCV RIR E-value Rosenbaum
plot_robustness_curve(), robustness_points() ✓ ✓ ✓ ✓ ✓
sens_table() ✓ ✓ ✓ ✓ ✓
sens_report() ✓ ✓ ✓ ✓ ✓
sens_surface(), plot_sensitivity_surface() ✓ ✓ – ✓ ✓
covariate_impacts(), plot_sensitivity_love() ✓ ✓ – – –
plot_sensitivity_contour() (exact correlation contour) – ✓ – – –

RIR has a single sensitivity parameter, so it has no two-parameter surface. Covariate benchmarks need a fitted linear model, so they are not available for E-values or matched pairs.

Installation

install.packages("confoundvis")
# development version
# install.packages("pak")
pak::pak("subirhait/confoundvis")

Example

library(confoundvis)
data("darfur", package = "sensemakr")
fit <- lm(peacefactor ~ directlyharmed + age + farmer_dar + herder_dar +
            pastvoted + hhsize_darfur + female + village, data = darfur)

p_r2 <- sens_path_lm(fit, treatment = "directlyharmed")   # sensemakr's RV
it   <- itcv_lm(fit, treatment = "directlyharmed")        # konfound's ITCV
rr   <- rir_lm(fit, treatment = "directlyharmed")         # konfound's RIR

sens_table(partial_r2 = p_r2, itcv = it$path, rir = rr$path)
plot_sensitivity_surface(sens_surface(p_r2))
sens_report(p_r2)

See vignette("confoundvis-workflow") for the full workflow, including E-values and matched pairs.

What confoundvis does not do

A sensitivity display shows how strong confounding would have to be to change a conclusion. It cannot show whether such a confounder exists, and it inherits the assumptions of the framework that produced it.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("confoundvis")

0.3.0 by Subir Hait, 11 days ago


https://github.com/subirhait/confoundvis


Report a bug at https://github.com/subirhait/confoundvis/issues


Browse source code at https://github.com/cran/confoundvis


Authors: Subir Hait [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports ggplot2, rlang, graphics, grDevices, stats

Suggests testthat, knitr, rmarkdown, sensemakr, konfound, EValue, DOS2, sensitivity2x2xk, sensitivitymv, ggrepel


Suggested by causalfrag.


See at CRAN