economicspackage documentation

Add a note

Checking an R port against Stata

What he did

Francis DiTraglia reports using Claude Code and the GPL-licensed Stata source to port ivreg2 to R. The R package, ivreg2r, was published on CRAN on 21 July 2026. Package and development notes · CRAN record

In the validation guide, Stata runs the test cases and exports the results to CSV. The R tests read those files and compare coefficients, covariance matrices and diagnostic statistics at documented tolerances. They also check integer counts. The project includes scripts to regenerate the expected results from Stata. Validation guide

Limits of this account

The checks cover the cases in the guide. This account draws on the full validation guide, the package’s development notes and the CRAN record. I did not rerun the tests in Stata or R.

Search the collection

↑ ↓ move · Enter open · Shift+Enter original source · Esc close · Search index for agents

Keyboard shortcuts

Single keys work when you are not typing and no dialog is open. Turn them off if stray key presses move the page. ⌘K / Ctrl+K and Esc keep working.

/
Search the collection
⌘K / Ctrl+K
Open or close search
?
Show these shortcuts
h
Home
l
Lessons
a
Accounts
r
Replications
p
Papers
g
Guides and tools
d
Timeline
b
Bookmark the record you are reading (press again to remove it)
s
Your saved list and notes
← →
Previous and next record on an account, lesson, replication or paper page, and in a quick look
m
Switch between system, light and dark theme
t
Back to the top of the page
Open full page