Skip to content

Fix fixest iv path - #3

Merged
DGoettlich merged 2 commits into
mainfrom
fix_iv
Apr 21, 2026
Merged

Fix fixest iv path#3
DGoettlich merged 2 commits into
mainfrom
fix_iv

Conversation

@DGoettlich

Copy link
Copy Markdown
Collaborator

Summary: fixes IV support for fixest.

Issue

  • scpcR was checking model$iv to decide whether a fixest model was an IV second-stage fit.
  • Somtime between v0.12 and v0.14 fixest, that flag seems to have been changed to model$is_iv instead.
  • Because of that, IV models were not recognized correctly, and scpcR fell back to the ordinary model-matrix path. That then caused a name mismatch like x vs fit_x and made the IV branch fail.

Fix

  • The fix updates the IV detector to use model$is_iv, keeps the stage check via iv_stage, and pins fixest >= 0.14.0 in the package metadata.
  • dded a regression test for IV-stage detection.
  • the existing IV helper tests, IV smoke tests, and the full test suite pass again.

Testing

  • Rscript -e "devtools::test(stop_on_failure = FALSE)"

@DGoettlich
DGoettlich requested a review from pdavidboll April 21, 2026 20:04
@DGoettlich
DGoettlich merged commit 7ed9ac4 into main Apr 21, 2026
3 checks passed
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