Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: xtreg or xtmixed?

From   Maarten Buis <>
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
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index