You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a basic line plot of the opposites_pp data at the top of the chapter, something like
opposites_pp %>%
ggplot(aes(x = time, y = opp, group = id)) +
geom_line(size = 1/4, alpha = 1/4)
Somewhere toward the end of the chapter, explicitly mention how the alternatives to the standard multilevel model of change do not have id-specific equations (what frequentists would call empirical Bayes).
The text was updated successfully, but these errors were encountered:
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).The text was updated successfully, but these errors were encountered: