I like to create a variable ROA which contains the values for the year 2004-2005 out of the years 2004-2014.
If I use the follwoing code with Stat 13 and I get the right variable with the ROA values for the YR 2004-2005 but missings for all other YR. And this is the Problem.
MY aim is run a regression for the Years 2006-2014 with this ROAh Variable with contains ROA values of 2004-2005 as an control bariable but I with my creation ot the ROAh variable I get some problems as of the missing values an the listwise deletion of stata.
Many thanks for any help
If I use the follwoing code with Stat 13 and I get the right variable with the ROA values for the YR 2004-2005 but missings for all other YR. And this is the Problem.
Code:
egen ROAh = ROA if YR ==2004 | YR ==2005
Code:
xtreg ROA LEV SI TAN GR ROAh, re vce(robust)
Comment