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-11")



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-11, https://cran.r-project.org/web/packages/WhatIf. Accessed 06 Jun. 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

AcrossTic  
A Cost-Minimal Regular Spanning Subgraph with TreeClust
Construct minimum-cost regular spanning subgraph as part of a non-parametric two-sample test for eq ...
Download / Learn more Package Citations See dependency  
geoR  
Analysis of Geostatistical Data
Geostatistical analysis including variogram-based, likelihood-based and Bayesian methods. Software c ...
Download / Learn more Package Citations See dependency  
selectapref  
Analysis of Field and Laboratory Foraging
Provides indices such as Manly's alpha, foraging ratio, and Ivlev's selectivity to allow for analysi ...
Download / Learn more Package Citations See dependency  
r2resize  
In-Text Resize for Images, Tables and Fancy Resize Containers in 'shiny', 'rmarkdown' and 'quarto' Documents
Automatic resizing toolbar for containers, images and tables. Various resizable or expandable contai ...
Download / Learn more Package Citations See dependency  
sSDR  
Tools Developed for Structured Sufficient Dimension Reduction (sSDR)
Performs structured OLS (sOLS) and structured SIR (sSIR). ...
Download / Learn more Package Citations See dependency  
datawizard  
Easy Data Wrangling and Statistical Transformations
A lightweight package to assist in key steps involved in any data analysis workflow: (1) wrangling ...
Download / Learn more Package Citations See dependency  

27,372

R Packages

233,548

Dependencies

72,820

Author Associations

27,205

Publication Badges

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