I’ve seen a lot of implementations of mixed-effects models in Stan. For example, I’ve been using brms to estimate a model with random effects for a grouping variable (e.g., store), that is comparable to what the lme4 package does with a “Frequentist” approach.
library(brms)
random_effects_model <- brm(revenue ~ sales + (1 | store_id))
However, I was wondering if there is also an implementation of fixed-effects models (i.e., incorporating store-level fixed effects to capture unobserved between-store heterogeneity in the contribution of a certain store to revenue), perhaps even in brms? Using a Frequentist approach, I was using the package lfe before:
library(lfe)
fixed_effects_model <- felm(revenue ~ sales | store_id)
Any ideas on how to do such thing in a Bayesian setting (using a package)? I want to avoid manual demeaning or inclusion of dummy variables (one dummy variable per store).
Thanks in advance.