Hi folks,
I’m having a lot of trouble setting up a multivariate mixture model in brms. Here’s a simple example:
set.seed(1234)
dat <- data.frame(
x = c(rnorm(200), rnorm(100, -6)),
y = c(rnorm(200), rnorm(100, 6))
)
fit1 <- brm(mvbind(x,y) ~ 1, dat,
family = mixture(gaussian,gaussian),
chains = 2,rescor=T,
prior=c(
prior(normal(0, 7),class = "Intercept",resp = "x",dpar = "mu1"),
prior(normal(-5, 7),class = "Intercept",resp = "x",dpar = "mu2"),
prior(normal(0, 7),class = "Intercept",resp = "y",dpar = "mu1"),
prior(normal(5, 7),class = "Intercept",resp = "y",dpar = "mu2")))
This throws the following error message:
Error in get(paste0(".family_", x)) : object '.family_mixture' not found
I’m using brms version 2.13.5 in R version 4.0.2 on OS X 10.13.6 High Sierra.