# Predicting out-of-sample for autoregressive models

**URL:** <https://discourse.pymc.io/t/predicting-out-of-sample-for-autoregressive-models/984>\
**Category:** Questions\
**Created:** [March 21, 2018, 4:50pm UTC](https://discourse.pymc.io/t/predicting-out-of-sample-for-autoregressive-models/984 "2018-03-21T16:50:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [March 24, 2018, 4:29pm UTC](https://discourse.pymc.io/t/predicting-out-of-sample-for-autoregressive-models/984/4 "2018-03-24T16:29:17Z")

</div>

I dont think you can do it using sample\_ppc, as `AR` and `AR1` does not have a random method.

You will have to write a generative function, and index to the posterior samples (as trace `point`) to generate ppc.

---

_[View the full topic](https://discourse.pymc.io/t/predicting-out-of-sample-for-autoregressive-models/984)._
