Hello, I am trying to create a mixture model for a population, where there it mixes 2 gaussian distributions:
fraction q ~ Beta(1.1,1.1)
uncertainty_multiple f ~ lognormal(log(10),0.7)
delta ~ lognormal(log(0.3), 0.4)
sigma ~ lognormal(log(0.3),0.3)
The distributions:
primary = pm.Normal.dist(0, obs_error*f)
shifted = pm.Normal.dist(-delta, sigma)
where fraction q gives the fraction of objects in the primary gaussian, the uncertainty_multiple f gives the number I multiply the observational uncertainty from my dataset (due to known underestimation of uncertainties from the data), delta the absolute mean shift of the secondary, shifted distribution and sigma the width of the shifted distribution, expected to be much wider than that of the primary. Finally, the mixture model is represented as:
obs = pm.Mixture(‘obs’, w=[q, 1-q], comp_dists = [primary, shifted], observed=data)
My question is: How should I write the model such that instead of using the mean observational uncertainty to be multiplied by f as the spread of the primary distribution (effectively the normal gaussian created for observational uncertainties), I can have each individual uncertainty from the data for each object in the population.
Sorry for any incorrect concepts about mixture models, I am still new to this!