Is there a way to add data to an Arviz object for a different PPC analysis?

Hello,

Is it possible to add “data” to the observed object in an arviz object? I have significant outliars that are few in quantity but massive in moving my model’s prediction distribution in a bad way. I’d like to train the model on an “outliar-corrected” data set, but run the az.plot_ppc using the actual data set.

I have added coordinates to an arviz object prior, but not data. Is that possible to add additional data to the observed then use an arg to tell arviz which to pull?

Can you use pm.MutableData to incorporate your “outlier-corrected” data set into your model, swap it out for “real” data using pm.setData() and then call pm.sample_posterior_predictive()? This doesn’t really seem like a plotting issue if I am understanding corrrectly.

1 Like

Yes. This is not a plotting issue but a lack of knowledge (until now) on how to work with the data correctly. Thank you. I’ll do what you suggested.

In that case, check out this notebook.

1 Like