HierarchicalInterruptedTimeSeries.plot_unit#
- HierarchicalInterruptedTimeSeries.plot_unit(unit_id=0, *, ci_prob=0.94)[source]#
Plot observed vs counterfactual and causal impact for a single unit.
- Parameters:
- Returns:
Matplotlib figure and axes. Top panel shows observed data, fitted mean (with effect) and counterfactual mean (without effect). Bottom panel shows the posterior causal impact with HDI.
- Return type:
fig, (ax1, ax2)