Other packages > Find by keyword >

WhatIf  

Software for Evaluating Counterfactuals
View on CRAN: Click here


Download and install WhatIf package within the R console
Install from CRAN:
install.packages("WhatIf")

Install from Github:
library("remotes")
install_github("cran/WhatIf")

Install by package version:
library("remotes")
install_version("WhatIf", "1.5-10")



Attach the package and use:
library("WhatIf")
Maintained by
Soubhik Barari
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2005-11-02
Latest Update: 2020-11-14
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>.
How to cite:
Soubhik Barari (2005). WhatIf: Software for Evaluating Counterfactuals. R package version 1.5-10, https://cran.r-project.org/web/packages/WhatIf. Accessed 07 Mar. 2026.
Previous versions and publish date:
1.3-4-3 (2005-11-02 22:38), 1.4-6 (2006-08-19 09:01), 1.5-4 (2007-10-14 11:47), 1.5-5 (2009-03-08 16:10), 1.5-6 (2014-01-08 23:38), 1.5-8 (2017-03-21 16:20), 1.5-9 (2017-07-25 13:36), 1.5-10 (2020-11-14 15:20)
Other packages that cited WhatIf R package
View WhatIf citation profile
Other R packages that WhatIf depends, imports, suggests or enhances
Complete documentation for WhatIf
Functions, R codes and Examples using the WhatIf R package
Some associated functions: peacecf . peacef . plot.whatif . print.summary.whatif . print.whatif . summary.whatif . whatif . 
Some associated R codes: load.first.R . plot.whatif.R . print.summary.whatif.R . print.whatif.R . summary.whatif.R . whatif.R .  Full WhatIf package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

SAMtool  
Stock Assessment Methods Toolkit
Simulation tools for closed-loop simulation are provided for the 'MSEtool' operating model to inform ...
Download / Learn more Package Citations See dependency  
nextGenShinyApps  
Craft Exceptional 'R Shiny' Applications and Dashboards with Novel Responsive Tools
Nove responsive tools for designing and developing 'Shiny' dashboards and applications. The scripts ...
Download / Learn more Package Citations See dependency  
ReviewR  
A Light-Weight, Portable Tool for Reviewing Individual Patient Records
A portable Shiny tool to explore patient-level electronic health record data and perform chart revi ...
Download / Learn more Package Citations See dependency  
portalr  
Create Useful Summaries of the Portal Data
Download and generate summaries for the rodent, plant, ant, and weather data from the Portal Projec ...
Download / Learn more Package Citations See dependency  
lmSubsets  
Exact Variable-Subset Selection in Linear Regression
Exact and approximation algorithms for variable-subset selection in ordinary linear regression mode ...
Download / Learn more Package Citations See dependency  
testDriveR  
Teaching Data for Statistics and Data Science
Provides data sets for teaching statistics and data science courses. It includes a sample of data f ...
Download / Learn more Package Citations See dependency  

26,264

R Packages

223,360

Dependencies

70,376

Author Associations

26,265

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA