MMMPlotSuite.posterior_predictive#

MMMPlotSuite.posterior_predictive(var=None, idata=None)[source]#

Plot time series from the posterior predictive distribution.

By default, if both var and idata are not provided, uses self.idata.posterior_predictive and defaults the variable to ["y"].

Parameters:
varlist of str, optional

A list of variable names to plot. Default is [“y”] if not provided.

idataxarray.Dataset, optional

The posterior predictive dataset to plot. If not provided, tries to use self.idata.posterior_predictive.

Returns:
figmatplotlib.figure.Figure

The Figure object containing the subplots.

axesnp.ndarray of matplotlib.axes.Axes

Array of Axes objects corresponding to each subplot row.

Raises:
ValueError

If no idata is provided and self.idata.posterior_predictive does not exist, instructing the user to run MMM.sample_posterior_predictive().