Skip to content

confoundvis

0.3.0Package record

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

0packages dependsuggested by 1
2.5Kdownloads / year
92.0%test coverage
13/13flavors OK

Overview

About

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, doi:10.1177/0049124100029002001; Frank et al., 2013, doi:10.3102/0162373713493129), partial R-squared omitted-variable bias analysis (Cinelli and Hazlett, 2020, doi:10.1111/rssb.12348), E-values (VanderWeele and Ding, 2017, doi:10.7326/M16-2607), and Rosenbaum bounds for matched pairs (Rosenbaum, 2002, doi:10.1007/978-1-4757-3692-2) 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.

Changes in 0.3.0

Scope

  • confoundvis is now a common interface to established sensitivity analyses only. The illustration functions fit_local_quadratic(), plot_local_taylor(), plot_taylor_panels(), plot_figure2_taylor_panels(), simulate_taylor_demo(), plot_reversal_cone(), and plot_cone_comparison() are removed. They did not analyse data and did not correspond to any established framework.
  • The introductory vignette built on stylized paths is removed; the workflow vignette covers every feature with real data.
  • 'grid' is no longer imported and 'gridExtra' is no longer suggested.

New features

  • sens_path_pairs() computes a sensitivity path for matched-pair studies under Rosenbaum's sensitivity model. For each value of Gamma it stores the deviate equivalent to the upper bound on the one-sided P-value, so robustness_points(), plot_robustness_curve(), sens_report(), and sens_table() apply unchanged. Two statistics are available: Wilcoxon's signed rank statistic (method = "wilcoxon", agreeing with DOS2::senWilcox()) and the exact bound for McNemar's statistic for binary outcomes (method = "binary", agreeing with sensitivity2x2xk::mh()). The sensitivity value is also found by root finding and stored in meta$sens_value.
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • rir_lm() computes the robustness of inference to replacement (RIR; Frank et al., 2013) from a fitted linear model: the threshold for significance, the percent of the estimate that would have to be due to bias, the number of cases that would have to be replaced with null-effect cases, and the corresponding path (estimate after replacing a proportion lambda of the cases). Results agree with konfound::konfound(index = "RIR") and reproduce the worked example of Frank et al.'s (2025) practical guide. A threshold argument allows a substantive effect threshold in place of statistical significance. from_konfound() gains index = "RIR" to import konfound's RIR output as a path.
  • ITCV benchmarks following Frank et al.'s (2025) practical guide: itcv_lm() returns benchmark_corr_product (R_XZ * R_YZ, the impact of all covariates together) and itcv_ratio_to_benchmark (eq. 12), and covariate_impacts() adds each term's zero-order correlations, their product impact_zero, and itcv_ratio, the unconditional ITCV divided by that impact (eq. 10).
  • sens_surface() returns the two-parameter sensitivity surface of which a path is one slice, and plot_sensitivity_surface() draws it with shaded zones, the null and significance boundaries, and optional benchmarks (sensemakr formal bounds are added automatically). Surfaces are available for partial R2 (Cinelli and Hazlett, 2020), ITCV (exact boundaries), E-values (joint bounding factor of Ding and VanderWeele, 2016), and Rosenbaum bounds (amplification of Rosenbaum and Silber, 2009, agreeing with sensitivitymv::amplify()). Boundaries are computed in closed form or by one-dimensional root finding.
  • sens_table() collects several confoundsens objects into one table: framework, meaning of the sensitivity parameter, the framework's own summary statistic, null and significance crossings, and the rule used. Rows keep their own scales; the printed table says so.
  • plot_sensitivity_contour() gains an itcv argument. Given the output of itcv_lm(), it draws, in closed form, the exact boundaries at which the magnitude of the confounder-adjusted partial correlation equals the critical value: in the original direction (solid) and in the reversed direction (dotted). It shades the region where the estimate is no longer significant, the region where it becomes significant with the opposite sign, and correlation pairs that cannot occur (non-positive-definite correlation matrix). The product curve is kept as a dashed reference. threshold may now be omitted when itcv is supplied, and a new limits argument sets the axis range.
  • Benchmark labels in plot_sensitivity_contour() repel one another when **ggrepel** is installed (suggested), instead of overlapping.

Bug fixes

  • itcv_lm(): for weighted fits, the R-squared values used for the unconditional ITCV were computed around an unweighted mean. They now equal the weighted R-squared reported by summary.lm(). Unweighted fits are unaffected.
  • sens_report() no longer points to covariate_impacts() for frameworks that it does not benchmark (E-values, Rosenbaum bounds).
  • robustness_points() now takes the direction of the original conclusion from the stored threshold when there is one. Paths that start on the wrong side of their threshold are therefore reported as not significant at the first grid value instead of returning NA. Results for paths produced by earlier versions are unchanged.

Other changes

  • **DOS2** and **sensitivity2x2xk** are suggested for the cross-checks in the test suite.
  • The workflow vignette adds the exact contour, a matched-pair example, and sens_table().

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.7 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-03-31
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 347 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.3.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
23 (2 internal)includes a package overview page
Examples that run
100%21 run in a plain check (3 of them under a condition)
Exported functions with examples
100%
Documented parameters
89%
Return-value docs
100%
Help pages citing references
35%

Downloads

2.5K
CRAN downloads in the past year
Rank #12,390 · ~7/day · ~210/mo
Daily download trend is not available in this view yet.
44230 days
88590 days
2.5K1 year
Compare downloads with other packages →
Also on45 r2u11 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
1Releases
28Commits
1Commit identities
28 commits · Last activity 2026-10-17
Responsiveness
not measured

Commits over time

2026-10-04 · 172026-10-18 · 28
Earlier repositories
PracticesBeta

5 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/subirhait/confoundvis on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (1)
README.Rmd
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)

Installing confoundvis adds 17 packages (7 with compiled code, 14 MB of source tarballs). Heaviest: ggplot2 6.0 MB, isoband 1.5 MB, farver 1.2 MB.

Depends (1)
R >= 4.1.0
Imports (5)
ggplot2rlanggraphicsgrDevicesstats
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.1.0 (2026)
Releases (3)

Pick two releases to compare their code metrics.

  • 0.3.0Latest
    record
    2026-10-17 · current release · diff ↗ ·
    removed 7 exports
    fit_local_quadratic, plot_cone_comparison, plot_figure2_taylor_panels, plot_local_taylor, plot_reversal_cone, plot_taylor_panels, simulate_taylor_demo
    added 5 exports
    plot_sensitivity_surface, rir_lm, sens_path_pairs, sens_surface, sens_table
    ·
    2 hours in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-17 19:55 to 2026-10-17 21:55 UTC, in 2 readings.
  • 0.2.0
    record
    2026-09-30 · diff ↗ ·
    added 9 exports
    covariate_impacts, from_evalue, from_konfound, from_sensemakr, itcv_lm, plot_taylor_panels, robustness_points, sens_path_lm, sens_report
  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.0
    record
    2026-03-30
  • R
    R 4.5.0 released · 2025-04-11
Across CRAN, the median accepted release of the past year spent 19 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-03-30
Total releases
3 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 4.1.0
Download size
136 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("confoundvis")
Hait, S. (2026). confoundvis: A Common Interface for Visualizing and Reporting Sensitivity Analyses for Unmeasured Confounding (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.confoundvis

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for confoundvis version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy