Hi, I am now running a panel regression, for example, return in year 2018=c+return in year 2010-2017+e. And year 2010-2017 is categorized as group 1, year 2018 is group 0. as attached.
I try to generate the new variables return1 and return2:
gen return1=0
gen return2=0
replace return1=reutrn if group==1
replace return2=return if group==0
then run the regression reg return2 return1
however, the result is contradictory to the cross section one and seems contradictory to the economic intuition.
Any comments to my solution? how should I do this?
Thank you and best,
Ivy
year | group | return |
2010 | 1 | 10 |
2011 | 1 | 11 |
2012 | 1 | 12 |
2013 | 1 | 13 |
2014 | 1 | 14 |
2015 | 1 | 15 |
2016 | 1 | 16 |
2017 | 1 | 17 |
2018 | 0 | 18 |
gen return1=0
gen return2=0
replace return1=reutrn if group==1
replace return2=return if group==0
then run the regression reg return2 return1
however, the result is contradictory to the cross section one and seems contradictory to the economic intuition.
Any comments to my solution? how should I do this?
Thank you and best,
Ivy
Comment