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]

st: time in xtmixed

From   Chao Wang <>
To   "" <>
Subject   st: time in xtmixed
Date   Tue, 26 Mar 2013 10:32:38 +0000

I think you can also try modelling the temporal effects as an autoregressive (AR) or moving average (MA) process, e.g., xtmixed depvar indepvar ||ptid:, residuals(ar1, t(time)).

Chao Wang

Date: Mon, 25 Mar 2013 17:06:56 +1000
From: megan rossi <>
Subject: st: time in xtmixed

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)
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.
Megan Rossi APD 
PhD Candidate School of Medicine, University of Queensland
Accredited Practicing Dietitian
Princess Alexandra Hospital Nutrition & Dietetic Department
m: 0402 931 441 | e: 
"Let food be thy medicine and medicine be thy food." - Hippocrates (ca. 460 - 377 BC)

This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.

*   For searches and help try:

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