How To Install r-cran-whatif on Ubuntu 20.04
Introduction
In this tutorial we learn how to install r-cran-whatif
on Ubuntu 20.04.
What is r-cran-whatif
r-cran-whatif is:
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 it is known 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.
There are three methods to install r-cran-whatif
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install r-cran-whatif Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install r-cran-whatif
using apt-get
by running the following command:
sudo apt-get -y install r-cran-whatif
Install r-cran-whatif Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install r-cran-whatif
using apt
by running the following command:
sudo apt -y install r-cran-whatif
Install r-cran-whatif Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install r-cran-whatif
using aptitude
by running the following command:
sudo aptitude -y install r-cran-whatif
How To Uninstall r-cran-whatif on Ubuntu 20.04
To uninstall only the r-cran-whatif
package we can use the following command:
sudo apt-get remove r-cran-whatif
Uninstall r-cran-whatif And Its Dependencies
To uninstall r-cran-whatif
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove r-cran-whatif
Remove r-cran-whatif Configurations and Data
To remove r-cran-whatif
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge r-cran-whatif
Remove r-cran-whatif configuration, data, and all of its dependencies
We can use the following command to remove r-cran-whatif
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge r-cran-whatif
References
Summary
In this tutorial we learn how to install r-cran-whatif
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.