Skip to content

TST: Test the implicit-constant F statistic of IVGMMCUE and IVJIVE - #866

Merged
bashtage merged 1 commit into
mainfrom
followup-859-f-test-estimators
Nov 6, 2026
Merged

bashtage merged 1 commit into
mainfrom
followup-859-f-test-estimators

Conversation

@bashtage

@bashtage bashtage commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Follow-up to #859, which leaves an intercept that dummy columns imply out of
the model F test of every IV estimator. Its test covered IV2SLS, IVLIML and
IVGMM; it now also covers IVGMMCUE and IVJIVE (80 cases, from 48).

IVGMMCUE minimizes its objective with BFGS, so the model with an explicit
constant stops at estimates that differ by rounding from those of the model
with the dummies; their F statistics differ by up to 4e-8. The comparison with
the explicit-constant model uses rtol=1e-6 for IVGMMCUE and keeps 1e-10 for the
other estimators. The comparison of the F statistic with its Wald test of the
same fit keeps 1e-10 for all five. The p-values are also compared with
atol=1e-12, since a p-value of 1e-16 changes by 1e-6 relative to itself.

The same problem remains in the robust F statistic of PooledOLS, the equation
F statistics of SUR and the has_constant of AbsorbingLS without effects
(xref #780).

🤖 Generated with Claude Code

Follow-up to #859, which leaves an intercept that dummy columns imply out of
the model F test of every IV estimator. Its test covered IV2SLS, IVLIML and
IVGMM; it now also covers IVGMMCUE and IVJIVE (80 cases, from 48).

IVGMMCUE minimizes its objective with BFGS, so the model with an explicit
constant stops at estimates that differ by rounding from those of the model
with the dummies; their F statistics differ by up to 4e-8. The comparison with
the explicit-constant model uses rtol=1e-6 for IVGMMCUE and keeps 1e-10 for the
other estimators. The comparison of the F statistic with its Wald test of the
same fit keeps 1e-10 for all five. The p-values are also compared with
atol=1e-12, since a p-value of 1e-16 changes by 1e-6 relative to itself.

The same problem remains in the robust F statistic of PooledOLS, the equation
F statistics of SUR and the has_constant of AbsorbingLS without effects
(xref #780).
bashtage added a commit that referenced this pull request Nov 6, 2026
The follow-ups to #858, #859 and #862 (#867, #866, #865) and the Windows ARM64 job of the CI (#868).
@bashtage
bashtage marked this pull request as ready for review November 6, 2026 14:40
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.68%. Comparing base (2be3f6c) to head (0fd5051).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #866   +/-   ##
=======================================
  Coverage   99.68%   99.68%           
=======================================
  Files         200      200           
  Lines       38076    38078    +2     
  Branches     2442     2442           
=======================================
+ Hits        37955    37957    +2     
  Misses         51       51           
  Partials       70       70           
Flag Coverage Δ
adder 99.67% <100.00%> (+<0.01%) ⬆️
subtractor 99.67% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage
bashtage merged commit d29628d into main Nov 6, 2026
26 checks passed
@bashtage
bashtage deleted the followup-859-f-test-estimators branch November 10, 2026 15:27
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.

1 participant