
From  "Paulo Loureiro" <loureiro77@hotmail.com> 
To  statalist@hsphsun2.harvard.edu 
Subject  RE: st: Explaining strange xtgee results 
Date  Thu, 31 Aug 2006 17:50:41 +0000 
From: Jason Bond <jbond@arg.org>
ReplyTo: statalist@hsphsun2.harvard.edu
To: <statalist@hsphsun2.harvard.edu>
Subject: st: Explaining strange xtgee results
Date: Mon, 28 Aug 2006 18:40:06 0700
Hello. My dataset is attached.
list x y id
shows the 3 variables I'm using:
scatter x y
and
line y x if id == 1  line y x if id == 2  line y x if id == 3  line y x if id == 4  line y x if id == 5  line y x if id == 6  line y x if id == 7
show the linked lines. So I have 7 pairs of observations, each of which is positively correlated. However, the overall trend of the between the pairs of points is negative, similar to Figure 1.1b in Diggle et al.'s book.
Running the simple population averaged model:
xtgee y x, i(id)
gives a negative estimate of the slope for x. If I separate out the (baseline) cross sectional effect from the longitudinal (time 2  time 1) effect, and run the same model
xtgee y x1rep x2diff, i(id)
where x1rep is just x repeated and x2rep is defined as x2  x1, I get a negative relationship for the crosssectional effect and a positive relationship for the longitudinal effect (which I expected). I am sort of surprised that I am getting a negative estimate for the slope of x in the gee model above though.
If I run a mixed model using:
xtmixed y x  id:
I get a positive estimate for the slope estimate of x. Is there something that I'm simply not seeing here? Thanks much,
Jason
_________________________________________________________________<< Examplegeedata.dta >>
© Copyright 1996–2016 StataCorp LP  Terms of use  Privacy  Contact us  What's new  Site index 