Skip to content

Commit b0399ee

Browse files
igerberclaude
andcommitted
Address PR #389 R8 P3: mass-point is a distinct estimator path, not a fallback
The "Mass-point fit fallback" troubleshooting subsection framed `mass_point` as a fallback that "just changes the SE regime." Per `had.py:33-39, 2260-2272` and REGISTRY:2400-2402, 2523-2527, mass-point is a distinct Design 1 estimator path from dCDH 2026 paper Section 3.2.4 (not the Appendix): both the point estimate (Wald-IV sample-average ratio with binary instrument `Z_g = 1{D_{g,2} > d_lower}`) AND the SE (structural-residual 2SLS sandwich) differ from the continuous local-linear / CCT-2014 paths. Renamed the subsection to "Mass-point design selected", rewrote the cause to spell out the 2%-modal-fraction trigger, the Wald-IV ratio formula, and the structural-residual sandwich; corrected the paper-section attribution (Section 3.2.4, not Appendix); refined the solution snippet to point at re-binning to drop modal fraction below 2% if the user prefers continuous_near_d_lower. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 96eb711 commit b0399ee

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

docs/troubleshooting.rst

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -515,28 +515,35 @@ is meaningfully positive relative to the dose scale.
515515
# the dose-variable encoding (e.g. log-transformed doses where 0 was
516516
# mapped to a small positive value larger than 1% of the median).
517517
518-
"Mass-point fit fallback"
519-
~~~~~~~~~~~~~~~~~~~~~~~~~
518+
"Mass-point design selected"
519+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
520520

521-
**Problem:** HAD reports that the ``mass_point`` fit path was used instead of
522-
the expected ``continuous_at_zero`` or ``continuous_near_d_lower`` path.
521+
**Problem:** HAD reports that the ``mass_point`` design was selected
522+
instead of ``continuous_at_zero`` or ``continuous_near_d_lower``.
523523

524-
**Cause:** Local-linear regression at the dose-support boundary requires a
525-
sufficiently dense neighborhood. When the dose distribution has a heavy
526-
mass-point at the boundary (e.g. many units at ``dose = d_lower``), HAD falls
527-
back to the structural-residual 2SLS sandwich derived in dCDH 2026 Appendix.
528-
This is a correct fallback, not a failure - it just changes the SE regime.
524+
**Cause:** ``mass_point`` is a distinct Design 1 estimator path from the
525+
dCDH 2026 paper (Section 3.2.4), not a fallback from the continuous
526+
local-linear fits. ``_detect_design()`` resolves to ``mass_point`` when the
527+
modal fraction at ``d.min()`` exceeds 2%, signalling a heavy point mass at
528+
the dose-support boundary. On this path both the point estimate and the SE
529+
differ from the continuous paths: the estimator uses the Wald-IV
530+
sample-average ratio with binary instrument ``Z_g = 1{D_{g,2} > d_lower}``
531+
- ``(Ybar_{Z=1} - Ybar_{Z=0}) / (Dbar_{Z=1} - Dbar_{Z=0})`` - and inference
532+
uses the structural-residual 2SLS sandwich (the local-linear / CCT-2014
533+
SE path is not used here).
529534

530535
**Solutions:**
531536

532537
.. code-block:: python
533538
534-
# Inspect the fit path used
535-
print(f"Design: {results.design}") # 'mass_point' indicates fallback
539+
# Inspect the resolved design
540+
print(f"Design: {results.design}") # 'mass_point' here
536541
537-
# The 2SLS sandwich is the correct inference for mass-point designs;
538-
# accept the fallback unless you can re-bin the dose variable to a
539-
# smoother distribution.
542+
# The mass-point Wald-IV estimator + structural-residual 2SLS
543+
# sandwich is the canonical Section 3.2.4 path for designs with a
544+
# heavy boundary point mass; accept the resolution unless you can
545+
# re-bin the dose variable so the modal fraction at d.min() drops
546+
# below 2% (then the detector picks continuous_near_d_lower).
540547
541548
"NotImplementedError on survey + mass-point + vcov_type='classical'"
542549
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)