# Issues with sample\_posterior\_predictive?

**URL:** <https://discourse.pymc.io/t/issues-with-sample-posterior-predictive/1798>\
**Category:** Questions\
**Created:** [August 24, 2018, 1:39am UTC](https://discourse.pymc.io/t/issues-with-sample-posterior-predictive/1798 "2018-08-24T01:39:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sophiaas](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sophiaas](https://discourse.pymc.io/u/sophiaas)\
**Post date:** [August 24, 2018, 1:39am UTC](https://discourse.pymc.io/t/issues-with-sample-posterior-predictive/1798/1 "2018-08-24T01:39:18Z")

</div>

Simply trying to sample from the posterior predictive on my pre-defined model, using

```python
ppc = pm.sample_posterior_predictive(trace, samples=500, model=model)

```

and I get the error

```python
AttributeError: 'module' object has no attribute 'sample_posterior_predictive'

```

What’s going on?

pymc3 is imported as pm.

---

<div class="post-metadata">

**Author:** ![rohanchauhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/rohanchauhan/32/963_2.png) [@rohanchauhan](https://discourse.pymc.io/u/rohanchauhan)\
**Post date:** [August 24, 2018, 3:58am UTC](https://discourse.pymc.io/t/issues-with-sample-posterior-predictive/1798/2 "2018-08-24T03:58:09Z")

</div>

It has been changed to `pm.sample_ppc()`

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [August 24, 2018, 7:34am UTC](https://discourse.pymc.io/t/issues-with-sample-posterior-predictive/1798/3 "2018-08-24T07:34:20Z")

</div>

Actually it is the other way around, `sample_ppc` has been changed to `sample_posterior_predictive`, but it is not in the newest release yet. You can either upgrade to master, or use `sample_ppc` until the next release.

---

<div class="post-metadata">

**Author:** ![rohanchauhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/rohanchauhan/32/963_2.png) [@rohanchauhan](https://discourse.pymc.io/u/rohanchauhan)\
**Post date:** [August 24, 2018, 11:06am UTC](https://discourse.pymc.io/t/issues-with-sample-posterior-predictive/1798/4 "2018-08-24T11:06:00Z")

</div>

Oh okay. Good to know. 🙂
