Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: new to xtmixed - basic question

From   Ricardo Ovaldia <>
Subject   st: new to xtmixed - basic question
Date   Wed, 20 Jul 2011 05:33:01 -0700 (PDT)


I am new to  –xtmixed-. 
I am using it to analyze longitudinal data on about 300 patients. The patients were randomized to three treatment groups and a blood metabolite was measured over time. The main interest is the effect of treatment on the metabolite, adjusted for both fixed covariates such as gender and time- changing covariates such as weight.
The model is of the form:
 xtmixed met treatment x1 x2 x3 || participantid:, covar(unstructured)

I have two questions.
1.	How does –xtmixed- know what is the time variable (there are gaps in the data).
2.	When I plot the met over time, if first increases and then decreases forming a upside down “U” or parabola shape. You I include a quadratic term for time in the model. For example:

. gen time2=time^2 

. xtmixed met treatment x1 x2 x3 time time2|| participantid:, covar(unstructured)

Thank you in advance ,

Ricardo Ovaldia, MS
Oklahoma City, OK

*   For searches and help try:

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