GradedInterventionTimeSeries.plot_irf#

GradedInterventionTimeSeries.plot_irf(channel, max_lag=None)[source]#

Plot the Impulse Response Function (IRF) for a treatment channel.

Shows how a one-unit impulse in the (saturated) exposure propagates over time through the adstock transformation.

Parameters:
  • channel (str) – Name of the treatment channel.

  • max_lag (int, optional) – Maximum lag to display.

Returns:

fig

Return type:

matplotlib.figure.Figure

Examples

fig = result.plot_irf("comm_intensity", max_lag=12)