This package provides functions to model compositional data in a multilevel framework using full Bayesian inference. It integrates the principes of Compositional Data Analysis (CoDA) and Multilevel Modelling and supports both compositional data as an outcome and predictors in a wide range of generalized (non-)linear multivariate multilevel models.
To install the latest release version from CRAN, run
install.packages("multilevelcoda")
The current developmental version can be downloaded from github via
if (!requireNamespace("remotes")) {
install.packages("remotes")
}::install_github("florale/multilevelcoda") remotes
Because multilevelcoda is built on brms, which is based on Stan, a C++ compiler is required. The program Rtools (available on https://cran.r-project.org/bin/windows/Rtools/) comes with a C++ compiler for Windows. On Mac, Xcode is required. For further instructions on how to get the compilers running, see the prerequisites section on https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started.
You can learn about the package from these vignettes:
multilevelcoda
and related softwareWhen using multilevelcoda, please cite one or more of the following publications:
As multilevelcoda depends on brms and Stan, please also consider citing: