WhatIf
1.5-11Software for Evaluating Counterfactuals
Overview
Inferences about counterfactuals are essential for prediction, answering what if questions, and estimating causal effects. However, when the counterfactuals posed are too far from the data at hand, conclusions drawn from well-specified statistical analyses become based largely on speculation hidden in convenient modeling assumptions that few would be willing to defend. Unfortunately, standard statistical approaches assume the veracity of the model rather than revealing the degree of model-dependence, which makes this problem hard to detect. 'WhatIf' offers easy-to-apply methods to evaluate counterfactuals that do not require sensitivity testing over specified classes of models. If an analysis fails the tests offered here, then we know that substantive inferences will be sensitive to at least some modeling choices that are not based on empirical evidence, no matter what method of inference one chooses to use. 'WhatIf' implements the methods for evaluating counterfactuals discussed in Gary King and Langche Zeng, 2006, "The Dangers of Extreme Counterfactuals," Political Analysis 14 (2) DOI:10.1093/pan/mpj004; and Gary King and Langche Zeng, 2007, "When Can History Be Our Guide? The Pitfalls of Counterfactual Inference," International Studies Quarterly 51 (March) DOI:10.1111/j.1468-2478.2007.00445.x.
Install
Health
- NOTE r-devel-linux-x86_64-debian-gcc
- NOTE2026-08-0112 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- OK2026-04-2512 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- NOTE2026-03-279 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-03-265 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 100%
Downloads
Repository
Stars over time
Forks over time
Issues over time
PRs over time
Repository practices
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/iqss/whatif on 2026-07-31.
Dependencies
Nothing depends on this yet.
Code & Tests
Datasets
People & History
9 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 1.5-11Latest
- unarchivedReturned to CRAN2026-03-25
- archivedRemoved from CRAN2025-12-22issues were not corrected despite reminders
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 1.5-102020-11-14 · diff ↗
- unarchivedReturned to CRAN2020-11-14
- RR 4.0.0 released · 2020-04-24
- archivedRemoved from CRAN2020-03-07check problems were not corrected despite reminders
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 1.5-92017-07-25 · diff ↗
Show 25 earlier events
- RR 3.4.0 released · 2017-04-21
- 1.5-82017-03-21 · diff ↗
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 1.5-62014-01-08 · diff ↗
- RR 3.0.0 released · 2013-04-03
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- RR 2.11.0 released · 2010-04-22
- RR 2.10.0 released · 2009-10-26
- RR 2.9.0 released · 2009-04-17
- 1.5-52009-03-08 · diff ↗
- RR 2.8.0 released · 2008-10-20
- RR 2.7.0 released · 2008-04-22
- RR 2.6.0 released · 2007-10-03
- 1.5-42007-09-24 · diff ↗
- RR 2.5.0 released · 2007-04-24
- RR 2.4.0 released · 2006-10-03
- 1.4-62006-08-19 · diff ↗
- RR 2.3.0 released · 2006-04-24
- 1.3-4-32005-10-31
- RR 2.2.0 released · 2005-10-06
Package metadata
- First published
- 2026-03-26
- Total releases
- 9 / 1 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 8.0 KB / 2 files
- Download size
- not tracked yet
- Installed size
- not tracked yet
- With dependencies
- not tracked yet