Installation
Prerequisites
CausalEGM can be installed via Pip, Conda, and GitHub for Python users. CausalEGM can also be installed via CRAN and GitHub for R users.
pip prerequisites
conda prerequisites
GPU prerequisites (optional)
Training CausalEGM model will be faster when accelerated with a GPU (not a must). Before installing CausalEGM, the CUDA and cuDNN environment should be setup.
Install with pip
Install CausalEGM from PyPI using:
```
pip install CausalEGM
```
If you get a Permission denied
error, use pip install CausalEGM --user
instead. Pip will automatically install all the dependent packages, such as TensorFlow.
Alteratively, CausalEGM can also be installed through GitHub using::
```
pip install git+https://github.com/SUwonglab/CausalEGM.git
```
or:
```
git clone https://github.com/SUwonglab/CausalEGM && cd CausalEGM/src
pip install -e .
```
-e
is short for --editable
and links the package to the original cloned
location such that pulled changes are also reflected in the environment.
Install with conda
CausalEGM can also be downloaded through conda-forge. Add
conda-forge
as the highest priority channel:conda config --add channels conda-forge
Activate strict channel priority:
conda config --set channel_priority strict
Install CausalEGM from conda-forge channel:
conda install -c conda-forge causalegm
Install R package (RcausalEGM)
We provide a standard alone R package of CausalEGM via Reticulate, which is named RcausalEGM.
The easiest way to install CausalEGM for R is via CRAN:
```
install.packages("RcausalEGM")
```
Alternatively, users can also install RcausalEGM from GitHub source using devtools:
```
devtools::install_github("SUwonglab/CausalEGM", subdir = "r-package/RcausalEGM")
```
For Rstudio users, CausalEGM R packages can also be installed locally by directly opening the R project file RcausalEGM.Rproj.