Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: xtreg or xtmixed?
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: xtreg or xtmixed?
Date
Mon, 19 Dec 2011 14:41:19 +0100
On Mon, Dec 19, 2011 at 2:22 PM, Johan van der Watt wrote:
> I created dummy variables for visit (visit 1/baseline as ref), then
> created variables for the interaction with neuropathy:
> gen neu_vis2= neuropathy*visit2
> gen neu_vis3=neuropathy*visit3
>
> I then added them to my -xtreg- syntax:
> .xtreg cd4_ neuropathy visit neu_vis2 neu_vis3, i(patientno) mle
You need to include visit2 and visit3 to and leave visit out. The
effects of visit2 and visit 3 tells you how visit 2 and visit 3 are
different from visit 0 for non-neuropathy persons. The effects of
neu_vis2 and neu_vis3 tells you how these effects of time differs for
neuropathy persons from non-neuropathy persons. By adding visit you
are assuming a linear effect of time for non-neuropathy patients and a
non-linear effect for neuropathy patients, which you don't want.
Better yet, use -i.visit##i.neuropathy- instead of making your own
dummies and interactions.
-- Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/