moderndid.plots.plot_multiplegt#

moderndid.plots.plot_multiplegt(result: DIDInterResult, show_ci: bool = True, ref_line: float | None = 0, xlab: str | None = None, ylab: str | None = None, title: str | None = None, **_kwargs: Any) ggplot[source]#

Create event study plot for intertemporal treatment effects.

Parameters:
resultDIDInterResult

Intertemporal treatment effects result from did_multiplegt().

show_cibool, default=True

Whether to show confidence intervals as error bars.

ref_linefloat or None, default=0

Y-value for reference line. Set to None to hide.

xlabstr, optional

X-axis label. Defaults to “Horizon”.

ylabstr, optional

Y-axis label. Defaults to “Effect”.

titlestr, optional

Plot title. Defaults to “Intertemporal Treatment Effects”.

Returns:
plotnine.ggplot

A plotnine ggplot object that can be further customized.