Bookmark and Share

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: time in xtmixed


From   David Hoaglin <[email protected]>
To   [email protected]
Subject   Re: st: time in xtmixed
Date   Mon, 25 Mar 2013 07:22:51 -0400

Megan,

To expand on Maarten's reply, i.time will give you separate effects
for the second and third time points (and the effect at the first time
point will be part of the constant term).  If you use time as a
"continuous" predictor, its coefficient will be the slope of depvar
against time (adjusted for the contribution of indepvar), and the
constant term will correspond to time = 0.  The second model is
simpler, but it assumes that the contribution of time is linear.

David Hoaglin

On Mon, Mar 25, 2013 at 3:06 AM, megan rossi <[email protected]> wrote:
> Hi Stata Guru's,
> Can anyone advise me on whether I need to include time variable as a categorical variable (ie. have a prefix i.) in xtmixed or can it be treated as a continous variable even though the data was collected at only three time points (evenly spaced). My research question: is depvar associated with indepvar independent of time ie. is syntax a or b most appropriate:
> a) xtmixed depvar indepvar time||ptid:time,cov(uns)
> or
> b) xtmixed depvar indepvar i.time||ptid:time,cov(uns)
> I noticed that the stata youtube video on this doesn't include i. however it was from 9 time points, not 3.
> Cheers,
> Megan Rossi APD

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index