Skip to content

rstanarm R package for Bayesian applied regression modeling

License

Notifications You must be signed in to change notification settings

mcdonohue/rstanarm

 
 

Repository files navigation

rstanarm

Latent Time Joint Mixed Effect Models (LTJMM)

This fork of the rstanarm package includes the following modifications:

  1. stan_mvmer models are extended from 3 to 20 longitudinal submodels
  2. stan_ljtmm extends stan_mvmer to accommodate a group-specific (individual-specific) latent time parameters which are shared within group across submodels.

The LTJMM is described in Li, et al. (2017).

Resources

  • Open an issue (GitHub issues for bug reports, feature requests)

Installation

To install from GitHub, first make sure that you can install the rstan package and C++ toolchain by following these instructions. Once rstan is successfully installed, you can install rstanarm from GitHub using the remotes package by executing the following in R:

# Change 2 to however many cores you can/want to use to parallelize install
# If you experience crashes or run out RAM during installation, try changing this to 1
Sys.setenv(MAKEFLAGS = "-j2")
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
remotes::install_github("mcdonohue/rstanarm", INSTALL_opts = "--no-multiarch", force = TRUE)

You can switch build_vignettes to TRUE but it takes a lot longer to install and the vignettes are already separately available from the Stan website and CRAN. If installation fails, please let us know by filing an issue.

Reference

  • Li, D., Iddi, S., Thompson, W. K., Donohue, M. C., for ADNI. (2017). Bayesian latent time joint mixed effect models for multicohort longitudinal data. Statistical methods in medical research. https://doi.org/10.1177/0962280217737566