Skip to content
Submodule
causalis.scenarios.did.refutation.diagnostic_plots

diagnostic_plots

Submodule causalis.scenarios.did.refutation.diagnostic_plots with no child pages and 3 documented members.

Functions

Jump directly into the documented functions for this page.

2 items

Data

Jump directly into the documented data for this page.

1 items
function
causalis.scenarios.did.refutation.diagnostic_plots.plot_did_support

plot_did_support

Plot Callaway & Sant’Anna support cells, sized by complete comparison-unit count.

Visualizes which cohort-time cells are estimable given the selected control group and base period policy. Blue circles indicate supported cells, while red indicates unsupported cells. Circle size corresponds to the number of available control units.

Parameters

dataPanelDataDID

The validated panel data object.

control_group{“not_yet_or_never”, “never_treated”}, default “not_yet_or_never”

The definition of the comparison group.

anticipationint, default 0

Anticipation periods to exclude.

base_period{“universal”, “varying”}, default “universal”

Base period policy.

include_pre_periodsbool, default False

Whether to include pre-treatment cells.

figsizetuple of float, default (10.0, 5.5)

The size of the figure.

dpiint, default 220

Resolution of the figure.

font_scalefloat, default 1.05

Scaling factor for font sizes.

Returns

matplotlib.figure.Figure

The resulting support plot.

Examples

fig.show()

Canonical target

causalis.scenarios.did.refutation.diagnostic_plots.plot_did_support

Sections

ParametersReturnsExamples
Link to this symbol
function
causalis.scenarios.did.refutation.diagnostic_plots.plot_raw_did_event_study

plot_raw_did_event_study

Plot an unadjusted, pre-fit DID event-study diagnostic.

Aggregates raw cohort-time differences into a single event-study plot. This is useful for a quick visual check of parallel trends and the magnitude of the unadjusted treatment effect.

Parameters

dataPanelDataDID

The validated panel data object.

control_group{“not_yet_or_never”, “never_treated”}, default “not_yet_or_never”

The definition of the comparison group.

anticipationint, default 0

Anticipation periods to exclude.

base_period{“varying”, “universal”}, default “varying”

Base period policy.

include_pre_periodsbool, default True

Whether to include pre-treatment periods.

figsizetuple of float, default (9.0, 5.2)

The size of the figure.

dpiint, default 220

Resolution of the figure.

font_scalefloat, default 1.05

Scaling factor for font sizes.

Returns

matplotlib.figure.Figure

The resulting event-study plot.

Examples

fig.show()

Canonical target

causalis.scenarios.did.refutation.diagnostic_plots.plot_raw_did_event_study

Sections

ParametersReturnsExamples
Link to this symbol
data
causalis.scenarios.did.refutation.diagnostic_plots.__all__

__all__

Value: ['plot_did_support', 'plot_raw_did_event_study']

[‘plot_did_support’, ‘plot_raw_did_event_study’]

Canonical target

causalis.scenarios.did.refutation.diagnostic_plots.__all__

Link to this symbol