Hello, I have a multivariate model with two outcomes (Poisson and lognormal) and I'm also trying to model the lognormal variance.
Here's the call:
brms.mod <- brm(bf(N.prest ~ Mesi + (Mesi | ID |Context), family = poisson()) + bf(Attesa ~ Mesi + (Mesi | ID |Context), sigma ~ Mesi + (Mesi | ID |Context), family = lognormal()), data = TdA, prior = c(set_prior('cauchy(0, 10)', class = 'Intercept'), set_prior("cauchy(0, 2.5)", class = 'b') ), init_r = 0.1, cores = 8, chains = 16, iter = 10000, thin = 2, control = list(max_treedepth = 15, adapt_delta = .90))
But then I'm not able to make predictions on sigma! if I use add_predicted_draws() I get only N.prest and Attesaand if I use add_fitted_draws with dpar = 'sigma' I get:
Error: Invalid argument 'dpar'. Valid distributional parameters are: 'mu'
But as you can see from the formula I did model sigma. How can I extract predictions for it?
(If I could do in one call, together with N.prest and Attesa, it would be great since it takes a while to run predictions every time)
Hello, I have a multivariate model with two outcomes (Poisson and lognormal) and I'm also trying to model the lognormal variance.
Here's the call:
brms.mod <- brm(bf(N.prest ~ Mesi + (Mesi | ID |Context), family = poisson()) + bf(Attesa ~ Mesi + (Mesi | ID |Context), sigma ~ Mesi + (Mesi | ID |Context), family = lognormal()), data = TdA, prior = c(set_prior('cauchy(0, 10)', class = 'Intercept'), set_prior("cauchy(0, 2.5)", class = 'b') ), init_r = 0.1, cores = 8, chains = 16, iter = 10000, thin = 2, control = list(max_treedepth = 15, adapt_delta = .90))
But then I'm not able to make predictions on sigma! if I use
add_predicted_draws()
I get onlyN.prest
andAttesa
and if I useadd_fitted_draws
with dpar = 'sigma' I get:Error: Invalid argument 'dpar'. Valid distributional parameters are: 'mu'
But as you can see from the formula I did model sigma. How can I extract predictions for it? (If I could do in one call, together with N.prest and Attesa, it would be great since it takes a while to run predictions every time)