Skip to content

Fix CausalForestDML ATE and ATT standard errors for multiple outputs - #1067

Open
kbattocchi wants to merge 1 commit into
mainfrom
kebatt/causal-forest-standard-errors
Open

kbattocchi wants to merge 1 commit into
mainfrom
kebatt/causal-forest-standard-errors

Conversation

@kbattocchi

@kbattocchi kbattocchi commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #1066.

_CausalForestFinalWrapper._ate_and_stderr previously counted all non-missing elements of the doubly robust prediction tensor, rather than counting observations separately for each outcome-treatment pair. This understated ATE and ATT standard errors whenever there were multiple outcomes or treatment contrasts.

  • Count non-missing predictions along the sample axis (axis=0), including after ATT masking.
  • Preserve point estimates and output shapes, and document the per-pair observation counts.
  • Add deterministic regressions for binary and three-arm treatments; vector, single-column, and multi-output outcomes; missing rows and unequal column missingness; and masked subsets.
  • Check fitted-estimator ATE/ATT standard errors, confidence intervals, z-statistics, and p-values, including every treatment group.

The separately identified multi-output model-selection scoring issue is intentionally out of scope.

Validation

  • Before the correction: 24 deterministic regression cases failed and 12 single-output/single-contrast controls passed.
  • After the correction: all 42 new regression cases and the existing causal-forest ATE inference test passed (43 total).
  • Ruff passed for both changed Python files; git diff --check passed.

Local fitted-estimator validation initially encountered a native-code crash with Cython 3.3.0. Rebuilding with the repository's last-known-good Cython 3.2.4 resolved it; the passing results above use that build.

@kbattocchi
kbattocchi force-pushed the kebatt/causal-forest-standard-errors branch from a3c0ba5 to 983c0d7 Compare September 28, 2026 19:39
@kbattocchi
kbattocchi changed the base branch from main to kebatt/fix-ci-build-failures September 28, 2026 19:39
@kbattocchi
kbattocchi added this pull request to stack #1070 September 28, 2026 19:44
@kbattocchi
kbattocchi force-pushed the kebatt/causal-forest-standard-errors branch from 983c0d7 to d75bfa5 Compare September 28, 2026 19:51
Base automatically changed from kebatt/fix-ci-build-failures to main October 1, 2026 19:06
Count non-missing doubly robust predictions along the sample axis. Preserve output shapes and document per-outcome, per-treatment counts. Add deterministic masked/missing-value regressions and fitted-estimator inference coverage.

Fixes #1066

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
@kbattocchi
kbattocchi force-pushed the kebatt/causal-forest-standard-errors branch from d75bfa5 to 722add0 Compare October 1, 2026 19:06

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CausalForestDML(drate=True): ate_stderr_ / att_stderr_ are too small by sqrt(d_y*d_t) with multiple treatments or outcomes

1 participant