Hi,
I have been trying to find the correct mixture of distributions to adequately model my bimodal continuous response distribution with brms. Comparing several different combinations of distribution families with LOO has brought me to a point where I think the first component of my response distribution is rather well represented by the posterior, see below for the latest model & fit:
mix = mixture(gaussian, skew_normal, order = 'mu')
prior <- c(prior(normal(-2.5,.1), Intercept, dpar = mu1),
prior(normal(7,.1), Intercept, dpar = mu2),
prior(normal(-8,1), alpha2))
model <- brm(bf(formula = accuracy ~ 1,
theta1 = 1, theta2 = 3),
data = dat,
family = mix,
warmup = 1000, iter = 5000,
cores = parallel::detectCores(),
chains = 4, control = list(adapt_delta = .97),
prior = prior,
inits = 0,
save_pars = save_pars(all = TRUE))
However, as you can see by the posterior predictive checks (below, left posterior distribution) the model isn’t doing so well for the second distribution component.
As my outcome variable is truncated at 9, I’ve then added an upper bound of 9 to the formula (see below, right), and upon visual comparison of the two pp checks, to me it looks like truncating has imroved the fit between data and predictions:
But model comparison is strongly in favour of the model that is not truncated:
In addition, it takes suspiciously long to add the fit criteria for model comparison (using add_criterion) to the truncated model (roughly 1.5 hours whereas add_criterion for the non-truncated model takes a couple of minutes), and I wonder why that is.
Now my main question is if anyone can think of a better way to model this second component than a truncated skew-normal distribution? I am relatively new to using mixture models with brms, so would highly appreaciate any help with this.