Plotting posterior predictive plot for time series data using Pystan

Hello, Pystan champions,

I have fitted a structural time series model in Stan and used arviz to plot posterior predictive distribution.

here is my code:

import arviz as az
idata = az.from_pystan(posterior=fit_TOUR_model, posterior_predictive=[“y_predict”], observed_data=[“y”])
az.plot_ppc(idata, num_pp_samples=2000,data_pairs={“y”: “y_predict”},mean=False)

image

But I would like to see the posterior plot with time in the horizontal axis and the actual and predictive draws in the vertical axis. Is there any way this can be done using arviz?

Thanks Champs,

Antony

Our GSOC student has started working on regression plots, but currently, these are not yet merged into the codebase.

1 Like

Thank you, I will keep an eye on the updates.
Thanks for your work in PyStan.

1 Like