Hi,
I'm looking for the right command to run first difference regression and have found it. I found several way to run first difference regression:
1. reshape to wide and create new variable using
Code:
g new_var= old_var2-old_var1
. Then run the regression
2.
Code:
reg d.dependent_var d.independent, nocons
My data is two years panel data in 2007 and 2014. I have my independent variable in the dummy form and i tried the first way to run first difference regression. I use this command:
Code:
reshape wide variable, i(id) j(year)
g diff_dependent= dependent_variable2014 - dependent_variable2007
g diff_independent= independent_variable2014- dependent_variable2007
after changing the independent variable (in the form of dummy), I get results 0 and -1 (due to subtraction).
Am I taking the right steps? Can I run first difference regression with an independent variable in the form of dumny?