Bug in fast sample posterior predictive?

That’s a nice ontology of PPC usages, Ricardo. You are correct. I want to do #5.

In another post on a similar issue, @OriolAbril suggested the technique of modifying values in an arviz.InferenceData trace, and then running pm.sample_posterior_predictive() to generate new distributions for unobserved variables.

That suggestion was made on a somewhat different problem, as I wanted to model intervention on RVs. In this case, I am trying to model intervention on deterministics.

So there are three possible interpretation of the behavior of the simple model in the original post, above:

  1. It is a bug. pm.fast_sample_posterior() should be able to work on modified samples of a deterministic.

  2. It’s not a bug. pm.fast_sample_posterior() can handle modified samples of RVs, but not deterministics.

  3. It’s off-label usage of pm.fast_sample_posterior(), and should not be relied on. It happens to work for RVs today, but that is more or less an accident. I should find a different technique to model interventions.

I think you are claiming #3.