Open ASKurz opened 2 years ago
Also, I don't know that S&W made this point, but it is possible to combine their various alternative error structures with random effects. Hoffman (2015) perhaps does a better job at this in Chapter 4, Section 3 (p. 131). You might show how to, say, fit a random intercept model with an AR1 like
fit7.5b <-
brm(data = opposites_pp,
family = gaussian,
opp ~ 0 + Intercept + time + ccog + time:ccog + ar(gr = id, cov = TRUE) + (1 + time | id),
iter = 2000, warmup = 1000, chains = 4, cores = 4,
seed = 7,
control = list(adapt_delta = .999,
max_treedepth = 12))
Note my use of control
. Even with this setting, the chains still aren't mixing well. You may have to think carefully about regularizing priors.
opposites_pp
data at the top of the chapter, something likeid
-specific equations (what frequentists would call empirical Bayes).