Hi everyone,
After a couple of months I finally gathered the data of my 5 weekly diary study on the work and life of expatriates in South-Korea. Currently I am busy with the analysis of the data. I assume that my dependent variables (stress& engagement) do not have a linear trend over 5 weeks but can fluctuate. Therefore I turend to dynamic modles instead of the linear growth model.
These dynamic models require lagged variables and I have been trying figuring out how to calculate these.
On the Stata website, I came across the following command:
. gen lag1 = x[_n-1] . gen lag2 = x[_n-2] . gen lead1 = x[_n+1]
I have been using these formulas to create 1 lead and 5 lag variables (since there are 5 weekly diaries). However, I have a couple of questions regarding this analysis, since I am currently very unfamiliar with this kind of multilevel modelling.
1. When calculating the lagged variables, I get missing values. I found this rather odd, since all participants have filled in the 5 weekly diaries, hence they have 5 data points for each dependent variable. Does anyone know whether I am missing something?
2. When conducting multilevel analysis for every seperate dependent variable, I used
. xtreg lead1 lag1 lag2 lag3 lag4 lag5, re mle
However, for some of the dependent variables the first lag was not significant. Is this a problem?
I am sorry if it is a bit unclear. The study is for my undergraduate thesis project, so it is my first time using STATA and multilevel modeling.
After a couple of months I finally gathered the data of my 5 weekly diary study on the work and life of expatriates in South-Korea. Currently I am busy with the analysis of the data. I assume that my dependent variables (stress& engagement) do not have a linear trend over 5 weeks but can fluctuate. Therefore I turend to dynamic modles instead of the linear growth model.
These dynamic models require lagged variables and I have been trying figuring out how to calculate these.
On the Stata website, I came across the following command:
. gen lag1 = x[_n-1] . gen lag2 = x[_n-2] . gen lead1 = x[_n+1]
I have been using these formulas to create 1 lead and 5 lag variables (since there are 5 weekly diaries). However, I have a couple of questions regarding this analysis, since I am currently very unfamiliar with this kind of multilevel modelling.
1. When calculating the lagged variables, I get missing values. I found this rather odd, since all participants have filled in the 5 weekly diaries, hence they have 5 data points for each dependent variable. Does anyone know whether I am missing something?
2. When conducting multilevel analysis for every seperate dependent variable, I used
. xtreg lead1 lag1 lag2 lag3 lag4 lag5, re mle
However, for some of the dependent variables the first lag was not significant. Is this a problem?
I am sorry if it is a bit unclear. The study is for my undergraduate thesis project, so it is my first time using STATA and multilevel modeling.
Comment