Bug in Software for Repeated Measures
February 16, 1998
Repeated measures data, in which several observations are collected for each subject, require special analysis techniques to account for correlation among observations from the same subject. A recent issue of StatNews suggested using either the XTGEE command in STATA or the REPEATED option in SAS PROC GENMOD for analyzing repeated measures data when the dependent variable is dichotomous. These procedures use the method of generalized estimating equations to account for within-subject correlation (see StatNews #22: Logistic Regression for Repeated Measures, Sept. 10, 1997). A bug has been discovered in these two procedures that can lead to incorrect results in certain cases.
The problem occurs in studies with one or more clusters of size one. This occurs when some subjects were only observed one time. If you specify that the correlations between all of the observations on the same subject are equal (the "exchangeable" correlation structure, one of the most common options), the estimate of the within-cluster correlation will be too small. This results in incorrect parameter estimates and standard errors. If your data set is large, and you only have a few clusters of size one, the effect on your results will be negligible. But if the proportion of clusters of size one in your data is moderate or large, you should not use PROC GENMOD in SAS 6.12 or versions of STATA's XTGEE command obtained prior to October 1997.
Licensed STATA users can obtain updated STATA files from the STATA website at www.stata.com. The bug has not been corrected yet in SAS PROC GENMOD. However, a SAS macro is available at ftp://statlab.uni-heidelberg.de/pub/statlib/GEE/GEE1that correctly handles clusters of size one.
More information about this problem is available on the web at http://biosun1.harvard.edu/~carey/snews.note. If you need help using SAS or STATA to perform logistic regression for repeated measures, or other analysis using generalized estimating equations, contact anyone in the Office of Statistical Consulting for assistance.
Author: Cara Olsen
Back to StatNews Table of Contents
(This newsletter was distributed to faculty and graduate students in the Division of Nutritional Sciences and the College of Human Ecology, and faculty in the College of Agriculture and Life Sciences, by the Office of Statistical Consulting. Please forward it to any interested colleagues and research staff. Anyone not receiving this newsletter who would like to be added to the mailing list for future newsletters should contact statcons@cornell.edu. Information about the Office of Statistical Consulting can be obtained at World Wide Web address http://www.cscu.cornell.edu.)