diff_diff.plot_group_effects

diff_diff.plot_group_effects(results, *, groups=None, figsize=(10, 6), title='Treatment Effects by Cohort', xlabel='Time Period', ylabel='Treatment Effect', alpha=0.05, show=True, ax=None)[source]

Plot treatment effects by treatment cohort (group).

Parameters:
  • results (CallawaySantAnnaResults) – Results from CallawaySantAnna estimator.

  • groups (list, optional) – List of groups (cohorts) to plot. If None, plots all groups.

  • figsize (tuple, default=(10, 6)) – Figure size.

  • title (str) – Plot title.

  • xlabel (str) – X-axis label.

  • ylabel (str) – Y-axis label.

  • alpha (float, default=0.05) – Significance level for confidence intervals.

  • show (bool, default=True) – Whether to call plt.show().

  • ax (matplotlib.axes.Axes, optional) – Axes to plot on.

Returns:

The axes object.

Return type:

matplotlib.axes.Axes