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

From   Nick Cox <>
Subject   Re: st: time in xtmixed
Date   Mon, 25 Mar 2013 09:12:22 +0000

I agree with Maarten.

0. Time could mean anything from calendar or clock time to time since
something started.

1. Including -time- as is implies a linear effect. Some systems behave
like that. Many don't.

2. As time takes on only a few distinct values, using indicator
variables would be relatively parsimonious and would presumably do a
bit better at capturing something nonlinear in time.

3. An old anova trick is to have both linear and categorical terms and
then see what the results imply (ideally that you can simplify down

A loose analogy is with seasonality. In many environmental systems a
sine and cosine pair provides a good first approximation to annual
cycles. The atmosphere doesn't know what festival or holiday it is.
But In many social and economic series there are spikes and dips for
special months and indicator variables for each month work much
better,so long as you have enough data. So, the choice depends not on
time but on what process in time you hope your model is caricaturing.


Maarten Buis

Both syntaxes are legal, and both models can be useful. Which one is
better in your case really depends on how you think time influences
your dependent variable.

Megan Rossi

Can anyone advise me on whether I need to include time variable as a
categorical variable (i.e. have a prefix i.) in -xtmixed- or can it be
treated as a continuous variable even though the data were collected
at only three time points (evenly spaced)? My research question: is
depvar associated with indepvar independent of time i
*   For searches and help try:

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