Skip to contents

bml fits Bayesian multiple-membership multilevel models via JAGS, so installation has two parts:

  1. Install JAGS (system software)
  2. Install the bml R package (from GitHub)

1. Install JAGS

Install the latest JAGS version for your operating system from:

After installing JAGS, restart R so rjags can find it.

2. Install bml from GitHub

bml is not on CRAN yet, so install it from GitHub. Using remotes keeps the dependency footprint small.

install.packages("remotes")
remotes::install_github("benrosche/bml")

If you want to build vignettes locally during installation:

3. Verify the installation

library(bml)
packageVersion("bml")

# Optional: confirm that rjags is linked against JAGS
rjags::jags.version()

Troubleshooting

Error: (converted from warning) ... while installing

If remotes treats an installation warning as an error on your machine, you can opt out:

Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS = "true")
remotes::install_github("benrosche/bml")

JAGS not found / rjags fails to load

  • Make sure JAGS is installed (not just the R packages), then restart R.
  • On Windows, confirm you installed the 64-bit JAGS build if you are using 64-bit R.