I don't think you can do this with -xtgee-. You need -xtmixed-.
Without knowing more about the substance of your problem, I can't tell
exactly how you would specify the model. But it looks like you have
visits nested within eyes nested within subjects. After converting "eye"
to a numeric variable (-encode-) you will probably end up needing
something like:
xtmixed slabpeak wdtpeak || subj: || eye: || visit:
Clyde Schechter MA MD
Albert Einstein College of Medicine
Bronx, NY, USA
// BEGIN ORIGINAL MESSAGE
Date: Wed, 1 Apr 2009 17:07:35 -0700
From: "Malta De Alencar, Luciana" <[email protected]>
Subject: st: Panel data - XTGEE with 2 levels of clustering
Dear Statalist,
I would like to ask some help on a multilevel unbalanced model (subjects -
eyes -
visits).
I have several subjects (subj). For most subjects both eyes were included
(eye), and
each eye was assessed from 1 to 3 different times (visits) under different
medications (the order of the visits is not important). Intraocular
pressure (IOP -
continuous variable) was measured by two different methods in each occasion
(iop_slab and iop_wdt).
I am interested in the comparison between these two methods (more
specifically if
wdt_iop can "predict" slab_iop), but I need to adjust for the repeated
measures in
each eye and for the correlation between both eyes of a same patient.
I?ve found some examples and publications online, but mostly with only two
levels. I
am relatively new to Stata. I?m using Stata/MP 10 on Windows. I believe
the best
option is to use xtgee, I'm only not sure how to include both levels.
I've pasted a sample of my data below:
subj eye visit wdtpeak slabpeak
22016 OD 1 25.50 18.50
22016 OS 1 19.50 19.50
22019 OD 1 16.50 22.50
22019 OS 1 15.25 21.00
22020 OD 1 23.00 22.00
22020 OD 2 20.00 20.00
22020 OS 1 23.50 23.00
22020 OS 2 18.00 20.50
22021 OD 1 33.00 34.50
22021 OD 2 31.00 30.50
22021 OS 1 26.50 30.00
22021 OS 2 25.00 27.50
22022 OD 1 18.00 23.00
22022 OD 2 16.00 23.00
22022 OS 1 20.00 25.50
22022 OS 2 17.50 23.00
22023 OD 1 21.50 22.50
22023 OD 2 21.50 23.50
22023 OS 1 20.00 22.00
22023 OS 2 20.00 23.00
22024 OD 1 22.00 22.00
22024 OD 2 19.00 22.50
22024 OD 3 18.00 23.00
Thank you very much.
Luciana
Luciana M. Alencar, M.D.
University of California , San Diego
Hamilton Glaucoma Center room 174
9500 Gilman Drive, Dept. 0946
La Jolla, CA 92093-0946
phone: 858.534.5334
fax: 858.822.0615
email: [email protected]<mailto:[email protected]>
// END ORIGINAL MESSAGE
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/