causalis.scenarios.unconfoundedness.refutation.overlap.overlap_plot.plot_m_overlapplot_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
The generated figure.
Notes
This figure compares the treated and control distributions of
. 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