Constraints on mixture model to be positive

As a follow on to my previous post. I have serological data that are negative and non-negative MFI values that range from -67.75 to 2759.50 (n = 1469), that are skewed heavily to the left. The values come from three different processes (individuals that have not been exposed to a pathogen, individuals that may have been exposed to a pathogen, and individuals that are showing a strong antibody response). I would like to model the probability that each individual has a probability of belonging to either of the three mixtures. I know from the data that mixture 1 includes all the negative values. Mixture 2 and 3 only have positive values. I also know that all the extremely high values are part of the third mixture (there aren’t that many of them). I am trying to specify a non-exchangeable mixture model.

I initially tried to define the mixtures like this: (gaussian, lognormal, lognormal), but that threw an error, because I have negative values in my data. Would it help to set the priors for each mixture to reflect my domain knowledge about the data generating process? I set the priors like below and there was a warning about specifying a lower bounded prior on a parameter that has no natural lower bound. Is there a way that I can specify that mixture 2 and 3 are positive?

Below is my brms code:


mix <- mixture(gaussian, gaussian, gaussian)

prior <- c(prior(normal(0,0.5), Intercept, dpar = mu1),
           prior(lognormal(0,0.5), Intercept, dpar = mu2),
           prior(lognormal(0,0.5), Intercept, dpar = mu3),
           prior(dirichlet(2,2,2), theta))


fit <- brm(NiV ~ 1,
           data = NiV,
           family = mix,
           prior = prior,
           chains = 1, backend = "cmdstanr")

Thanks for your help.

1 Like

Why not a skew normal distribution?

Do you mean using a skew normal for the data distribution or the mixture priors? How would that look in code?