HierarchicalInterruptedTimeSeries.plot#
- HierarchicalInterruptedTimeSeries.plot(*, ci_prob=0.94, show=True, legend_kwargs=None)[source]#
Plot the fitted hierarchical model’s population-level effect.
Dispatches on
effect_type: a forest plot of per-unit lifts plus the population posterior for"instant", the population Hill saturation curve for"saturation", or an event-study plot of per-bin population effects for"event_study"/"placebo". Seeplot_unit()to plot a single unit’s observed vs. counterfactual trajectory instead.- Parameters:
ci_prob (
float) – Probability mass of the HDI band drawn around per-unit lifts, the saturation curve, or per-bin event-study effects. Must be in(0, 1]. Defaults toHDI_PROB.show (
bool) – Whether to automatically display the plot. Defaults toTrue.legend_kwargs (
dict[str,Any] |None) – Keyword arguments to adjust legend placement and styling. Supported keys:loc,bbox_to_anchor,fontsize,frameon,title(bbox_transformis accepted alongsidebbox_to_anchor).
- Returns:
Matplotlib figure and axes (a pair of axes for
"instant", a single axes otherwise).- Return type:
fig, ax