Bayesian Modeling with STAN Part 3 – Handling Categorical Predictors

We’ve been discussing how to code STAN models and Part 1 and Part 2 served as a basic intro for simple linear regression, multiple linear regression, and model checking. Today, we cover how to code categorical variables into your models. STAN doesn’t handle categorical variables so, it’s on the user to properly index these variables as integers in the model. This can take a bit of practice and can get confusing. In this blog article I offer a few different approaches to accomplish the same task.

Click here to read the RMarkdown Blog Article >> STAN-Part-3—Handling-Categorical-Predictors

Click here to access the code >> STAN Part 3 – Handling Categorical Predictors