diff_diff.sensitivity_plot#

diff_diff.sensitivity_plot(results, method='relative_magnitude', M_grid=None, alpha=0.05, ax=None, **kwargs)[source]

Create a sensitivity analysis plot.

Parameters:
  • results (MultiPeriodDiDResults, CallawaySantAnnaResults, ChaisemartinDHaultfoeuilleResults, or EventStudyResults) – Results from event study estimation, or the unified event-study container from CallawaySantAnnaResults.aggregate('event_study'), DMLDiDResults.aggregate('event_study'), or StackedDiDResults.aggregate('event_study') (Stacked containers require kappa_pre >= 2).

  • method (str) – Type of restriction.

  • M_grid (list of float, optional) – Grid of M values.

  • alpha (float) – Significance level.

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

  • **kwargs – Additional arguments passed to plot method.

Returns:

ax – The axes with the plot.

Return type:

matplotlib.axes.Axes