# Automatic imputation for posterior predictive check?

**URL:** <https://discourse.pymc.io/t/automatic-imputation-for-posterior-predictive-check/5623>\
**Category:** Questions\
**Created:** [August 15, 2020, 7:38am UTC](https://discourse.pymc.io/t/automatic-imputation-for-posterior-predictive-check/5623 "2020-08-15T07:38:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vian](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/vian/32/4300_2.png) [@vian](https://discourse.pymc.io/u/vian)\
**Post date:** [August 15, 2020, 7:38am UTC](https://discourse.pymc.io/t/automatic-imputation-for-posterior-predictive-check/5623/1 "2020-08-15T07:38:09Z")

</div>

Hi there,

I understand that PyMC3 does an automatic imputation of missing data. I guess this cannot be an option that you can switch off because the code would crash because of these missing values and the alternative is to mask them.

I wonder whether the automatic imputation is also done for the posterior predictive check (sample\_posterior\_predictive and fast\_sample\_posterior\_predictive)?

The reason for the question is that I’ve been considering adding some deterministic variables to the trace a posteriori (post-inference) to do the posterior predictive check on them. This would prevent me from adding them to the model, since they are not useful for the inference solution and since they take a lot of memory.

Cheers,  
MV

---

<div class="post-metadata">

**Author:** ![AlexAndorra](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/alexandorra/32/9142_2.png) [@AlexAndorra](https://discourse.pymc.io/u/AlexAndorra)\
**Post date:** [August 17, 2020, 8:53am UTC](https://discourse.pymc.io/t/automatic-imputation-for-posterior-predictive-check/5623/2 "2020-08-17T08:53:52Z")

</div>

Hi Vianey,  
Do you have a use-case in mind that you can share? It would be easier to answer – and more concrete.  
Also, note that [you can disable missing data imputation](https://discourse.pymc.io/t/disabling-missing-data-imputation/4926) if you need to.  
Hope this helps 🖖
