This is the model I have now, which runs without any warning messages and the fit seems reasonable (graphs).
brm.formula = brmsformula (formula = n|trials(n.act) ~ 1-exp(a)/(1+exp(a))*exp(-exp(b)*exp(-exp(cc)*age)),
a ~ 1 + (1|motherID),
b ~ 1 + (1|motherID),
cc ~ 1 + (1|motherID),
flist = NULL, nl = T, family = binomial(“identity”)
)
priors = c(
set_prior(“normal(6.5, 1.5)”, class=“b”, coef=“Intercept”, nlpar=“a”),
set_prior(“normal(3.5, 0.6)”, class=“b”, coef=“Intercept”, nlpar=“b”),
set_prior(“normal(0.5, 0.2)”, class=“b”, coef=“Intercept”, nlpar=“cc”),
set_prior(“normal(0,0.2)”, class=“sd”, nlpar=“a”, group=“motherID”),
set_prior(“normal(0,0.2)”, class=“sd”, nlpar=“b”, group=“motherID”),
set_prior(“normal(0,0.2)”, class=“sd”, nlpar=“cc”, group=“motherID”))
m9 ← brm(formula = brm.formula,
data = xdata,
family = binomial(“identity”),
prior = priors,
control = list(adapt_delta = 0.95), cores = 4,
chains = 4, iter = 5000, warmup = 1000)
I want to add the following predictors (xdata.txt): predictor 3 (continuous variables), predictor 2,4,and 5 (categorical with two levels each). Follow ID as a grouping factor with 817 levels. Could someone help me with the model specification and how I could go about setting the priors for these predictors and grouping factor? @paul.buerkner
xdata.txt (42.3 KB)

