Title | Interpreting standard errors produced by Stata’s xtgee and SAS’s proc GENMOD | |
Author | James Hardin, StataCorp |
A user asked
I tried to run the same model using Stata’s xtgee and SAS’s PROC GENMOD. I get the same coefficient estimates and working correlation matrix but different standard errors. xtgee seems to be consistently lower. I’m using a Poisson distribution and exchangeable correlation.
The part of the SAS output titled “Analysis of initial estimates” is the output for a pooled Poisson estimator (which is almost identical to the GEE output since the extra correlation parameter is nearly zero).
What SAS calls “empirical standard errors” are (almost) equal to what Stata calls “robust standard errors”. They are not exactly equal because Stata multiplies clustered robust variance matrices by a factor equal to C/(C − 1), where C is the number of clusters. Run the xtpoisson/xtgee with the vce(robust) option and you will see this relationship.
SAS also has an option to the REPEATED statement called MODELSE where you will get “model standard errors” instead of “empirical standard errors”. If you use that option you will get Pearson chi2 scaled standard errors, which are different from what Stata prints out (without the vce(robust) option). To get the same answers as provided by Stata in its default case, you should also specify the SCALE=1 option on the REPEATED statement in SAS. This applies if the family you specify is discrete (Poisson or binomial).
Here are the relationships for SAS models again:
There is one difference between SAS 6.12 TS Level 0060 (and Windows version 4.10.1650) and Stata that cannot be explained: The results (beta, working correlation matrix, and standard errors) of using PROC GENMOD do not match xtgee when panels are unbalanced.
Learn
Free webinars
NetCourses
Classroom and web training
Organizational training
Video tutorials
Third-party courses
Web resources
Teaching with Stata
© Copyright 1996–2024 StataCorp LLC. All rights reserved.
×
We use cookies to ensure that we give you the best experience on our website—to enhance site navigation, to analyze usage, and to assist in our marketing efforts. By continuing to use our site, you consent to the storing of cookies on your device and agree to delivery of content, including web fonts and JavaScript, from third party web services.
Cookie Settings
Last updated: 16 November 2022
StataCorp LLC (StataCorp) strives to provide our users with exceptional products and services. To do so, we must collect personal information from you. This information is necessary to conduct business with our existing and potential customers. We collect and use this information only where we may legally do so. This policy explains what personal information we collect, how we use it, and what rights you have to that information.
These cookies are essential for our website to function and do not store any personally identifiable information. These cookies cannot be disabled.
This website uses cookies to provide you with a better user experience. A cookie is a small piece of data our website stores on a site visitor's hard drive and accesses each time you visit so we can improve your access to our site, better understand how you use our site, and serve you content that may be of interest to you. For instance, we store a cookie when you log in to our shopping cart so that we can maintain your shopping cart should you not complete checkout. These cookies do not directly store your personal information, but they do support the ability to uniquely identify your internet browser and device.
Please note: Clearing your browser cookies at any time will undo preferences saved here. The option selected here will apply only to the device you are currently using.