computing the model likelihood from MCMC samples