Evaluate Counterfactuals

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) ; and Gary King and Langche Zeng, 2007, "When Can History Be Our Guide? The Pitfalls of Counterfactual Inference," International Studies Quarterly 51 (March) .


Release: CRAN Version CRAN Monthly Downloads CRAN Total Downloads

Development: Project Status: Active - The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status AppVeyor Build Status

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); and Gary King and Langche Zeng, 2007, "When Can History Be Our Guide? The Pitfalls of Counterfactual Inference," International Studies Quarterly 51 (March).

News

All changes to WhatIf are documented here. GitHub issue numbers are given after each change note when relevant. See https://github.com/IQSS/WhatIf/issues/. External contributors are referenced with their GitHub usernames when applicable.

WhatIf version 1.5-9

Major changes

  • 🚀 convex hull test now run in parallel. The number of cores can be specified in the whatif call with the mc.cores argument.

Minor changes

  • Additional tests added.

  • Progress bar added to whatif convex hull test to indicate progress.

  • Travis CI added for continuous integration testing.

WhatIf version 1.5-8

Major changes

  • Returns Zelig integration.

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("WhatIf")

1.5-9 by Christopher Gandrud, 2 years ago


http://gking.harvard.edu/whatif


Report a bug at https://github.com/IQSS/WhatIf/issues


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


Authors: Christopher Gandrud [aut, cre] , Gary King [aut] , Ben Sabath [ctb] , Heather Stoll [aut] , Langche Zeng [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports lpSolve, pbmcapply, Zelig

Suggests testthat


Imported by zeligverse.

Suggested by MatchIt.


See at CRAN