Skip to content
Submodule
causalis.scenarios.unconfoundedness.refutation.overlap.overlap_plot

overlap_plot

Submodule causalis.scenarios.unconfoundedness.refutation.overlap.overlap_plot with no child pages and 1 documented members.

Functions

Jump directly into the documented functions for this page.

1 items
function
causalis.scenarios.unconfoundedness.refutation.overlap.overlap_plot.plot_m_overlap

plot_m_overlap

Overlap plot for m(x)=P(D=1|X) with high-res rendering.

  • x in [0,1]

  • Stable NumPy KDE w/ boundary reflection (no SciPy warnings)

  • Uses Matplotlib default colors unless color_t/color_c are provided

Parameters

diagUnconfoundednessDiagnosticData or CausalEstimate

Diagnostic data directly, or an estimate containing diagnostic_data with m_hat and d.

cliptuple, default (0.01, 0.99)

Quantiles to clip for KDE range.

binsstr or int, default “fd”

Histogram bins.

kdebool, default True

Whether to show KDE.

shade_overlapbool, default True

Whether to shade the overlap area.

axmatplotlib.axes.Axes, optional

Existing axes to plot on.

figsizetuple, default (9, 5.5)

Figure size.

dpiint, default 220

Dots per inch.

font_scalefloat, default 1.15

Font scaling factor.

savestr, optional

Path to save the figure.

save_dpiint, optional

DPI for saving.

transparentbool, default False

Whether to save with transparency.

color_tcolor, optional

Color for treated group.

color_ccolor, optional

Color for control group.

Returns

matplotlib.figure.Figure

The generated figure.

Notes

This figure compares the treated and control distributions of m(X)=P(D=1X)m(X) = \mathbb{P}(D=1 \mid X). Good overlap means both groups place noticeable mass in the same regions of the unit interval. Clear separation or strong piling-up near 0 and 1 is a warning sign for unstable weighting.

Examples

Canonical target

causalis.scenarios.unconfoundedness.refutation.overlap.overlap_plot.plot_m_overlap

Sections

ParametersReturnsNotesExamples
Link to this symbol