DiagnosticsPlots.residuals_over_time#
- DiagnosticsPlots.residuals_over_time(hdi_prob=0.94, idata=None, dims=None, figsize=None, backend=None, return_as_pc=False, hdi_kwargs=None, line_kwargs=None, **pc_kwargs)[source]#
Plot residuals (target − posterior predictions) over time.
Computes residuals using
y_original_scalefrom posterior_predictive andtarget_datafrom constant_data. One panel per extra-dimension combination. Each panel shows a mean residuals line, an HDI band, and a zero reference line.- Parameters:
- hdi_prob
float, default 0.94 HDI probability mass for the residual band.
- idata
az.InferenceData, optional Override instance data.
- dims
dict[str,Any], optional Subset dimensions.
- figsize
tuple[float,float], optional - backend
str, optional - return_as_pcbool, default
False - hdi_kwargs
dict, optional Forwarded to
azp.visuals.fill_between_y.- line_kwargs
dict, optional Forwarded to
azp.visuals.line_xyfor the mean residuals line.- **pc_kwargs
Forwarded to
PlotCollection.wrap().
- hdi_prob
- Returns:
tuple[Figure,NDArray[Axes]] orPlotCollection
Examples
fig, axes = mmm.plot.diagnostics.residuals_over_time() fig, axes = mmm.plot.diagnostics.residuals_over_time(hdi_prob=0.50)