Hello,
I am new to using the brms package and am having difficulty running a mixed-effects location-scale model as outlined by Lester, Cullen-Lester, and Walters (2019). The code for my (final) model is as follows:
modelfinal <- bf(avoidc ~ 1 + dfs + rlength + (1 + dfs|ID1|user_id),
sigma ~ 1 + dfs + rlength + (1 + dfs|ID1|user_id))
modelfinal_out <- brm(modelfinal, data = explore1,
chains = 4, cores = 4, iter = 5000,
control = list(adapt_delta = .85, max_treedepth = 15),
seed = 8712, save_all_pars = T)
I am following the build-up procedure outlined by Lester et al. (2019) starting with an empty model. The empty model (below) ran pretty quickly.
empty_mod <- bf(avoidc ~ 1 ,
sigma ~ 1 )
The random intercept model runs after about 30 minutes.
random_int <- bf(avoidc ~ 1 + (1 | user_id),
sigma ~ 1 )
random_int_out <- brm(random_int, data = explore1, chains = 4,
cores = 4, iter = 5000, control = list(adapt_delta = .85,
max_treedepth = 15),
seed = 186, save_all_pars = T)
As soon as I get to a more complex step (below), I cannot successfully get it to run (I allowed it to run for about 3 days).
random_ints_loc_scale <- bf(avoidc ~ 1 + (1 |ID1|user_id),
sigma ~ 1 + (1 |ID1|user_id))
random_ints_loc_scale_out <- brm(random_ints_loc_scale, data = explore1,
chains = 4, cores = 4, iter = 5000,
control = list(adapt_delta = .85,
max_treedepth = 15), seed = 4789, save_all_pars = T)
Finally, I tried my final model (the MELS) with only 100 iterations just to see if it would work and the below code did successfully run after about 10 hours.
modelfinal <- bf(avoidc ~ 1 + dfs + rlength + (1 + dfs|ID1|user_id),
sigma ~ 1 + dfs + rlength + (1 + dfs|ID1|user_id))
modelfinal_out <- brm(modelfinal, data = explore1,
chains = 4, cores = 4, iter = 100,
control = list(adapt_delta = .85, max_treedepth = 15),
seed = 8712, save_all_pars = T)
Since I hope to use iter = 5000, it seems like it is not feasible to use the brms package with the way things are going/how long it took for 100 iterations. I have tried specifying prior1 ā c(prior(normal(0, 1), class = b)) and changing adapt_delta to .90 based on posts Iāve read. Neither seemed to help.
I am really excited about the possibility of doing these analyses but feel lost at what to do at this point. Iām not sure whether the model will never run, or if it is worth trying to wait many days. Iām also not sure whether it would be worth trying to run the code on a different computer (like borrowing someoneās desktop versus my laptop) or to specify additional informative priors to try to cut down the run time (if so, any suggestions for how to select priors for MELS models would be great). The dataset I am using does have 11,423 observations nested within 1402 people, and I am willing to wait many hours for it to run. However, as a graduate student, I unfortunately have to run the analyses before a deadline and need to decide whether to pursue a different project.
Any help or advice would truly be greatly appreciated! Also, if you spot something wrong with my code or have an idea about something that might be causing this issue (with the data, etc.), please let me know.
Thank you so much!