# Plotting traces from time series

**URL:** https://discourse.pymc.io/t/plotting-traces-from-time-series/4998
**Category:** Questions
**Created:** [May 2, 2020, 6:14pm UTC](https://discourse.pymc.io/t/plotting-traces-from-time-series/4998 "2020-05-02T18:14:19Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![OriolAbril](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/oriolabril/32/2497_2.png) [@OriolAbril](https://discourse.pymc.io/u/OriolAbril)
#### Post date: [May 3, 2020, 11:45pm UTC](https://discourse.pymc.io/t/plotting-traces-from-time-series/4998/5 "2020-05-03T23:45:14Z")

</div>

`likelihood` is an observed variable, and therefore it is NOT sampled during the inference run. It is intended and desired behaviour.

`likelihood` is defined as a variable to indicate PyMC how to calculate the likelihood, that is, evaluate the probability of the defined distribution `AR(beta, sd=sigma)` at the observed values, `delta` in this case. `ll_alias` is therefore not useful at all to evaluate the fit.

If you pay attention to the plot, you’ll see that _all `ll_alias` samples are identical to `delta`_:

![pymc3_deterministic_not_post_pred](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/8/88d3fb6b3873e67893d2c4b39b0f8ddd86ded981.png)

To examine how well does the fitted model describe the observed data, you need posterior predictive samples. If the method has random method implemented (which is [not the case for AR distribution](https://discourse.pymc.io/t/predicting-out-of-sample-for-autoregressive-models/984/4)), you’ll get the proper samples too examine the fit. See the [example notebook on posterior predictive checks](https://docs.pymc.io/notebooks/posterior_predictive.html) and [PyMC resources](https://github.com/pymc-devs/resources) for more details and examples.

---

_[View the full topic](https://discourse.pymc.io/t/plotting-traces-from-time-series/4998)._
