Package: WhatIf
Title: Software for Evaluating Counterfactuals
Version: 1.5-11
Date: 2026-03-06
Authors@R: c(
    person("Heather", "Stoll", role = "aut",
           email = "hstoll@polsci.ucsb.edu"),
    person("Gary", "King", role = "aut",
           email = "king@harvard.edu"),
    person("Langche", "Zeng", role = "aut",
           email = "zeng@ucsd.edu"),
    person("Christopher", "Gandrud", role = "aut",
           email = "zelig.zee@gmail.com"),
    person("Ben", "Sabath", role = "aut"),
    person("Soubhik", "Barari", role = "ctb",
           email = "soubhikbarari@gmail.com"),
    person("Katalina", "Toth", role = "cre",
           email = "katalinaltoth@gmail.com"))
Description: 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>.
License: GPL (>= 3)
URL: https://gking.harvard.edu/whatif
BugReports: https://github.com/IQSS/WhatIf/issues
Depends: R (>= 3.5.0)
Imports: lpSolve, pbmcapply, parallel
Suggests: testthat (>= 3.0.0)
RoxygenNote: 6.0.1
NeedsCompilation: no
Packaged: 2026-03-25 18:09:27 UTC; katalinatoth
Author: Heather Stoll [aut],
  Gary King [aut],
  Langche Zeng [aut],
  Christopher Gandrud [aut],
  Ben Sabath [aut],
  Soubhik Barari [ctb],
  Katalina Toth [cre]
Maintainer: Katalina Toth <katalinaltoth@gmail.com>
Repository: CRAN
Date/Publication: 2026-03-25 22:20:15 UTC
Built: R 4.6.0; ; 2026-04-25 13:11:49 UTC; unix
