Say I have two InferenceData objects from two separate calls to pm.sample in two spectate models.
Say these contain posteriors for theta_1 and theta_2 respectively. These are mutually independent (eg.theta_1 is proportion of cats with tails, theta_2 is proportion of people called Hugh).
How would I combine these two create an inference data object with both posteriors in them, as if I’d called pm.sample on the model with both (do that I can feed this in to a posterior predictive involving both parameters)?
Precisely (but obviously without wrapping them both just in one model context and re-running, assume that I already have traces from 2 expensive models to sample from).
Well, I dont know of any available functions that do that but I have not dabbled with Inference Objects in detail. If no such function exists I guess one can start doing it by manually. For instance if you have idata1, idata2 sampled independently and you have their posterior_predictive groups then
and then do for instance az.plot_ppc(idata_combined) or az.plot_posterior(idata_combined) it produces plots for both models which look identical to plots you get from combined model.