causalis.scenarios.did.refutation.post_inference_plots.plot_did_post_inference_event_studyplot_did_post_inference_event_study
Plot the fitted CS event-study estimates with confidence intervals.
This function visualizes the dynamic effects of treatment over time relative to the start of treatment (event time). It displays the event-study aggregation of the group-time average treatment effects .
Parameters
- data_or_estimatePanelDataDID or CallawaySantAnnaDIDEstimate
Either the validated panel data or the fitted estimate object. If data is passed, the
estimateparameter must also be provided.- estimateCallawaySantAnnaDIDEstimate, optional
The fitted model results. Required if
data_or_estimateis aPanelDataDID.- show_simultaneousbool, default True
Whether to show the simultaneous confidence bands if available in the estimate.
- figsizetuple of float, default (9.0, 5.2)
The size of the figure in inches (width, height).
- dpiint, default 220
The resolution of the figure.
- font_scalefloat, default 1.05
Scale factor for font sizes in the plot.
Returns
The resulting event-study plot.
Examples
Fit the model
Notes
The event-study aggregation at event time is defined as:
where are weights based on the sample size of each group at that event time. Pointwise confidence intervals are shown by default. If the model was estimated using the multiplier bootstrap, simultaneous confidence bands can also be displayed to account for multiple testing across event times.
Canonical target
causalis.scenarios.did.refutation.post_inference_plots.plot_did_post_inference_event_study
Sections