I have a panel data set (several observations of different individuals over time) for which I want to construct a simple bayesian multilevel model. Therefore, I want to use the brms package. Does anyone know how to deal with the panel data structure in the brms package, because I can't find anything about it in the brms package manual. In the manual there are only examples of cross-sectional data sets. Many thanks in advance!
Asked
Active
Viewed 266 times
0
-
Welcome to SO. You have to ask a specific programming question. If you're asking for package documentation, a tutorial or article, sorry that's [offtopic](https://stackoverflow.com/help/dont-ask). Why not try to write code using the panel data structure, then when you encounter a specific issue, post the code and errors here? That would keep things [on-topic](https://stackoverflow.com/help/on-topic) for SO. – smci Oct 25 '18 at 07:49
-
1The syntax of brms is largely the same es in lme4. Without further specification of what you are planing to model it is hard to help. Based on the information you gave your model formular might look like the following: `y ~ 1 + predictor1 + predictor2 + .... + (1|PersID)`. Where PersID is your grouping variable that indicates which measurements belong to one person. This would reflect the panel structure by including a individual specific intercept (random intercept). – FAMG Dec 06 '18 at 16:30