This is the project for **A tutorial on Bayesian analysis of ecological momentary assessment data in psychological research**
While reading the tutorial, we suggest that you work your way through the accompanying R code in parallel. You can find the data and analysis script under **Files**. You can also find a workspace which contains all modeling results.
**Setting up your computer to fit Bayesian mixed-effects models with the brms package:**
Follow these steps in order:
1. Install the latest version of R from https://CRAN.R-project.org
2. Install ‘RStudio’ Desktop (Free) from https://posit.co
3. Configure your R installation to be able to compile C++ code. For Windows, install RTools following the instructions here https://github.com/stan-dev/rstan/wiki/Configuring-C---Toolchain-for-Windows. For Mac, install XCode following the instructions here https://github.com/stan-dev/rstan/wiki/Configuring-C---Toolchain-for-Mac.
4. Install RStan following the instructions here https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started
5. Install brms by executing the following command in R: `install.packages("brms")`