Hello,
In all my stata analyses, time serves as a control variable. Now that I am using runmlwin, and after going through the courses in LEMMA I am confused whether to use time as a level 2 classification. Thus, my level 1 is facility, level 2 time, level 3 ParentFirm.
or should I add time as a covariate. If so, how do I add it as a categorical predictor.
Time as a predictor
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Time as a predictor
Could you provide any further information about what your time variable represents? E.g., Is it the occasion on which a measurement was taken, as in the example in chapter 13 of the MLwiN manual (https://www.bristol.ac.uk/cmm/media/sof ... al-web.pdf), or is it a continuous measurement? If it is categorical, how many unique values can it take in your data? What purpose are you hoping to use it for in your analysis?
-
- Posts: 7
- Joined: Sat Apr 05, 2025 9:06 pm
Re: Time as a predictor
The best way to put this is that my data is a longitudinal data. So I am dealing with firms. Therefore, I am looking at the firms operating in 2015, 2016, 2017, 2018, 2019, 2020..... I have 10 time periods. I am controlling for the time. In stata's gsem, I realised that whether I contorlloed for the time (with i.time) like a categorical variable or I made it a level 2 classification, the result was not very different.
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Time as a predictor
These two approaches should also work with runmlwin, so it is probably worth trying both ways and then comparing with the results that you had previously from gsem.
-
- Posts: 1
- Joined: Wed Apr 16, 2025 3:56 am
Re: Time as a predictor
Stata's gsem treats things differently under the hood than runmlwin. So even when you treat time as a level, you’re not getting much added value unless you’re modeling random slopes or variance components at the time level (which is uncommon unless you're analyzing time itself as a source of random variation, like in educational data with testing years).UmmAymanBarakah wrote: Mon Apr 07, 2025 3:44 pm The best way to put this is that my data is a longitudinal data. So I am dealing with firms. Therefore, I am looking at the firms operating in 2015, 2016, 2017, 2018, 2019, 2020..... I have 10 time periods. I am controlling for the time. In stata's gsem, I realised that whether I contorlloed for the time (with i.time) like a categorical variable or I made it a level 2 classification, the result was not very different.