Plotting#
The plotting module provides a unified interface for visualizing difference-in-differences
results, sensitivity analyses, and event studies. All plotting functions return
plotnine ggplot objects that can be further customized using standard plotnine syntax.
DiD Result Plots#
High-level functions for plotting treatment effect estimates from DiD analyses. Automatically selects the appropriate visualization based on the result type (group-time ATT, event study, and aggregated effects).
Plot group-time average treatment effects. |
|
Create event study plot for dynamic treatment effects. |
|
Create plot for aggregated treatment effects by group or calendar time. |
Continuous Treatment Plots#
Functions for visualizing dose-response relationships from continuous treatment DiD.
Plot dose-response function for continuous treatment. |
Intertemporal DiD Plots#
Functions for visualizing dynamic treatment effects from the intertemporal DiD estimator.
Create event study plot for intertemporal treatment effects. |
Sensitivity Analysis Plots#
Functions for visualizing HonestDiD sensitivity analysis results.
Create sensitivity analysis plot for HonestDiD results. |
Data Converters#
To extract the underlying data from any result object as a polars DataFrame,
use to_df. See the Result Extraction
API reference for details and the full list of individual converters.