Please also provide the following information in addition to your question:
- Operating System: Windows 10
- brms Version: 2.2.0
I am using the brm function to fit my model and I have four different outcomes (count data with different max scores for each outcome), measured at three different time points. I first fit the model separately for all outcomes and time points, i.e. ran 12 different models, and there was no issues with this. However, when I am trying to run the model with all outcomes simultaneously as a hierarchical model and including the random effect parameter (exposure | outcome:time), it takes extremely long to fit, even when just running the crude model without confounders (for example, for the crude model, in the chain progress, I get the following message: “1000 transitions using 10 leapfrog steps per transition would take 8650 seconds”). I do have a very large dataset (n=66000 (*12 for the hierarchical model)), can this be a sole reason for why the model takes so long to compute? If not, do you have any suggestions on what I can try to resolve this? Below is an example on how I have specified the model. Many thanks in advance, Tiril
model1 = brm(outcome~ exposure + (exposure | outcometype:time),
phi ~ (1|outcometype:time)),
prior = c(set_prior(“normal(0,2)”, class = “b”),
set_prior(“normal(0,3)”, class = “Intercept”),
set_prior(“normal(0,3)”, class = “Intercept”, dpar = “phi”)),
data=dr,
family = beta_binomial2,
stan_funs = stan_funs,
stanvars = stanvar(as.integer(dr$max), name = “trials”),
control = list(adapt_delta = 0.99,
max_treedepth = 15),
chains = 4,
iter = 500)