An R package for fitting a linear varying coefficient model using Bayesian Additive Regression Trees. For more details about the VCBART procedure, see our paper.
The package source files are contained in the sub-directory VCBART
.
To install, you can download those files and then build and install the package from the command line.
Alternatively, you can install the package using the following command in R:
devtools::install_github(repo = "skdeshpande91/VCBART", subdir = "VCBART").
If you are using macOS, you will need to have previously set up the macOS toolchain for R. This is typically something you have to do only once (and if you have used packages with Rcpp dependence, you probably already have done this). But in case you haven't and are unable to install VCBART, you might find the following links helpful:
- R for macOS for more information.
- Instructions from The Coatless Professor. Note that these instructions may not be relevant for later versions of macOS (e.g. ones shipped with an Apple silicon processor)
- This StackOverflow post, which outlines how to install the necessary C++ compiler, gfortran, and set the necessary paths.
The directory paper_examples
contains code to reproduce all figures from our paper.
It further contains code for a single replication of our synthetic simulation study; to reproduce the entire simulation study, one would need to run that code repeatedly.
Finally, it contains code used to pre-process and analyze the HRS dataset and the Philadelphia crime data.