Currently the optimisation (not the MCMC) appears unreliable if starting far from the true parameters for the GMM case (when the data is drawn from a GMM of known parameters). This can probably be improved by better initialisation. Perhaps fit a GMM to the xobs values directly without doing the function fit and use these parameters as an initial guess for the full optimisation problem.
Currently the optimisation (not the MCMC) appears unreliable if starting far from the true parameters for the GMM case (when the data is drawn from a GMM of known parameters). This can probably be improved by better initialisation. Perhaps fit a GMM to the xobs values directly without doing the function fit and use these parameters as an initial guess for the full optimisation problem.