Different Intercept Terms in Frequentist and Bayesian Regression

Hi, if the data are based on two repeated measurements, you should include random intercepts for individual ID in the model. If you don’t, the estimated standard errors will be incorrect (as when you apply an unpaired t-test when you should be using a paired one). The frequentist code for this would be:

library(lme4)
lmer(post ~ group + preS + (1 | ID), df)

For the Stan version, see the examples on random effects in the manual