xtreg vs areg
Darom Caemul
Darom Caemul
below are two sets of program files for reproducing the results in Disease and Development. The first, under the heading "Program Files for Use with Stata 10 or higher," will exactly reproduce the paper's results when used with Stata 10 or higher, but will not reproduce the paper's results when used with Stata 9 or lower. We realized after the paper's publication that the Stata procedure used to calculate standard errors with the xtreg command - used throughout the paper - was changed between Stata 9 and Stata 10. In all version of Stata prior to Stata 10, the commands xtreg and aregestimate identical standard errors, as both correct for the degrees of freedom used in estimating fixed effects. In contrast, in Stata 10 and higher, xtreg does not correct for the degrees of freedom used to estimate fixed effects, while aregcorrects for the degrees of freedom used to estimate fixed effects in all versions of Stata. Thus xtreg in Stata 10 and higher produces standard errors somewhat smaller than those produced by areg in all versions of Stata or by xtreg in Stata 9 and lower, and Disease and Development can only be reproduced using Stata 10 or higher. (Tables 8 and 9 also use a small sample correction for the standard errors that is only available in Stata 10 or higher.)
For comparison purposes, the second set of program files below, entitled "For use with any version of Stata", uses aregand will produce identical estimates regardless of which version of Stata is used, as areg always corrects the standard errors for the degrees of freedom used to estimate fixed effects. However, these programs will not reproduce the paper's results since they were estimated with xtreg in Stata 10. For more information about the changes in the xtreg procedure in Stata 10, and about the areg and xtreg commands more generally, please see the Stata manuals.
No comments:
Post a Comment