There are three waves of data in the survey I use. My independent variable (a score) is continuous and dependent variable dichotomous. I would like to create a variable indicating change of the score from wave 1 to wave 2 and 2 to 3 to regress it on the dependent variable at waves 2 and 3. I am thinking of first creating a change variable
Code:
gen leadvar = score[_n+1]
gen changevar = leadvar - score
, and then should I just
Code:
xtlogit changevar devar
? Will this regress the independent variable on the right wave of dependent variable? Thank you.