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: Re: new to xtmixed - basic question
From
Ricardo Ovaldia <[email protected]>
To
[email protected]
Subject
Re: st: Re: new to xtmixed - basic question
Date
Thu, 21 Jul 2011 08:42:53 -0700 (PDT)
Thank you Clyde,
In my model I did have -treatment- as a categorical variable, I just inadvertently dropped the "i." when I posted it to Statalist. When I use - i.treatment##c.time##c.time2- in the model all interaction terms are not significant and neither is the treatment effect. When I do not interact treatment and time, treatment is significant.
Ricardo
Ricardo Ovaldia, MS
Statistician
Oklahoma City, OK
--- On Thu, 7/21/11, Clyde Schechter <[email protected]> wrote:
> From: Clyde Schechter <[email protected]>
> Subject: st: Re: new to xtmixed - basic question
> To: [email protected]
> Date: Thursday, July 21, 2011, 9:30 AM
> In your first model:
>
> The model is of the form:
> xtmixed met treatment x1 x2 x3 || participantid:,
> covar(unstructured)
>
> Stata would _not_ know what the time variable is and no
> time effects would
> be modeled.
>
> Your second model:
>
> . gen time2=time^2
>
> . xtmixed met treatment x1 x2 x3 time time2||
> participantid:,
> covar(unstructured)
>
> gets you closer. But here, the only thing you detect
> about treatment is
> whether or not the trajectories of met over time are
> vertically displaced
> from each other in the three treatment groups.
> (Actually, you won't even
> get that because specifying treatment the way you did,
> Stata will assume
> you want treatment treated as a 1 df numeric variable
> rather than as a
> 3-level factor variable.) But I would imagine you
> would like to consider
> the possibility that the treatment leads to trajectories
> with different
> steepness and curvature. So I think what you really
> want is something
> like:
>
> xtmixed met i.treatment##time##time2 x1 x2 x3 ||
> participantid:,
> covar(unstructured).
>
> The above will work if your time variable is simply
> ordinal. If it is
> actually an elapsed time you may want to treat it as
> continuous, in which
> case you will want to substitute
> i.treatment##c.time##c.time2 in the
> above.
>
> (I am assuming that you are not interested in looking at
> treatment effect
> modification by the covariates.)
>
> Hope this helps.
>
>
> Clyde Schechter
> Department of Family & Social Medicine
> Albert Einstein College of Medicine
> Bronx, NY, USA
>
> Please note new e-mail address: [email protected]
>
> *
> * 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/
>
*
* 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/