Search
   >> Home >> Resources & support >> FAQs >> Handling singletons in GEE with exchangeable correlation
o Note: This FAQ is for users of releases prior to Stata 6. It is not relevant for more recent versions.

How does Stata’s xtgee handle singletons with exchangeable correlation?

Title   Handling singletons in GEE with exchangeable correlation
Author James Hardin, StataCorp
Date January 1999

In 1997, there was a report that the estimation of the exchangeable working correlation parameter was incorrect whenever the dataset included singletons (panels of size 1). The original report cited several statistical software packages including Stata version 5.

This bug does not affect Stata version 6.

For Stata version 5, Stata responded to this report by updating the Stata executable and the xtgee.ado files in order to fix the bug.

To determine if this bug is present in any particular GEE solver, you can use the data below for id, y, and x

 1 22.5324 0
 2 22.1011 0
 3 21.693 0
 4 21.3061 0
 6 20.2493 0
 6 20.3324 230
 6 19.6399 406
 6 18.6703 593
 6 20.9972 770
 7 23.2159 0
 8 23.4819 0
 8 23.1031 242
 8 23.6713 382
 8 23.2609 551
 8 23.7659 718
 9 20.4287 0
 9 18.9259 234
 10 24.1646 0
 10 23.5287 273
 10 24.5693 416
 10 24.0201 616
 10 24.6849 806
 12 21.1412 0
 12 21.8088 225
 12 22.8473 400
 12 22.1797 595
 12 21.7346 771

Flawed GEE solvers will report that the exchangeable correlation parameter is 0.748; the correct value is 0.953.

Here is the output of this test using Stata version 6:

 . xtgee y x, i(id)
 
 Iteration 1: tolerance = .00309187
 Iteration 2: tolerance = .00003388
 Iteration 3: tolerance = 3.738e-08
 
 GEE population-averaged model                   Number of obs      =        27
 Group variable:                         id      Number of groups   =        10
 Link:                             identity      Obs per group: min =         1
 Family:                           Gaussian                     avg =       2.7
 Correlation:                  exchangeable                     max =         5
                                                 Wald chi2(1)       =      1.15
 Scale parameter:                  2.952649      Prob > chi2        =    0.2838
 
 ------------------------------------------------------------------------------
        y |      Coef.   Std. Err.       z     P>|z|       [95% Conf. Interval]
 ---------+--------------------------------------------------------------------
        x |   .0003297   .0003076      1.072   0.284      -.0002732    .0009327
    _cons |   21.95229   .5412312     40.560   0.000       20.89149    23.01308
 ------------------------------------------------------------------------------
 
 . xtcorr
 
 Estimated within-id correlation matrix R:
 
         c1      c2      c3      c4      c5
 r1  1.0000
 r2  0.9530  1.0000
 r3  0.9530  0.9530  1.0000
 r4  0.9530  0.9530  0.9530  1.0000
 r5  0.9530  0.9530  0.9530  0.9530  1.0000
The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube