economicspackage documentation
Checking an R port against Stata
More in social sciences and law
- Thomas D. Grantlaw, 20 Nov 2026
- Chris Blattmaneconomics, Oct 2026
- William Baudelaw, 25 Sep 2026
- Pedro H. C. Sant'Annaeconomics, 24 Jun 2026
- Scott Cunninghameconomics, 12 Jun 2026
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.