Hello community,
I am currently working on a time series analysis and constructing a prediction model. In my logistic regression model from 2000 to 2008 different independent variables shall be included. My problem here: a few of the independent variables should be included over the entire period (var3 & var4 are time invariant) and two independent variables (var1 & var2) should only be included in the regression from the period 2001 to 2008. I already read something about this in the forum, but only the Lagged and Lead command was explained here. But I don't think that this is applicable here, because the data will only be moved, but I want to keep it in that respective year. My current code is:
xtlogit depvar var1 var2 var3 var4 var5, re
Due to the missing data of var1 and var2 in the year 2000, STATA eliminates the 2000 year column and only includes the rest in the regression. Can someone kindly help me with the code to avoid this?
many thanks in advance!!
the following shows the course of the variables over time for one selected observation (a person)
I am currently working on a time series analysis and constructing a prediction model. In my logistic regression model from 2000 to 2008 different independent variables shall be included. My problem here: a few of the independent variables should be included over the entire period (var3 & var4 are time invariant) and two independent variables (var1 & var2) should only be included in the regression from the period 2001 to 2008. I already read something about this in the forum, but only the Lagged and Lead command was explained here. But I don't think that this is applicable here, because the data will only be moved, but I want to keep it in that respective year. My current code is:
xtlogit depvar var1 var2 var3 var4 var5, re
Due to the missing data of var1 and var2 in the year 2000, STATA eliminates the 2000 year column and only includes the rest in the regression. Can someone kindly help me with the code to avoid this?
many thanks in advance!!
the following shows the course of the variables over time for one selected observation (a person)
Comment