CRAN/E | WhatIf

WhatIf

Software for Evaluating Counterfactuals

Installation

About

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.

gking.harvard.edu/whatif
Bug report File report

Key Metrics

Version 1.5-10
R ≥ 2.3.1
Published 2020-11-14 1269 days ago
Needs compilation? no
License GPL (≥ 3)
CRAN checks WhatIf results

Downloads

Yesterday 4 -33%
Last 7 days 64 -30%
Last 30 days 240 +13%
Last 90 days 683 -21%
Last 365 days 2.936 -17%

Maintainer

Maintainer

Soubhik Barari

soubhikbarari@gmail.com

Authors

Heather Stoll
Gary King
Langche Zeng
Christopher Gandrud
Ben Sabath

Material

NEWS
Reference manual
Package source

In Views

CausalInference

macOS

r-release

arm64

r-oldrel

arm64

r-release

x86_64

r-oldrel

x86_64

Windows

r-devel

x86_64

r-release

x86_64

r-oldrel

x86_64

Old Sources

WhatIf archive

Depends

R ≥ 2.3.1

Imports

lpSolve
pbmcapply
parallel

Suggests

testthat