I have panel data of150+ companies for the years 2001-19. I have divided these years between pre-crisis years (2001 to 2006) and post crisis years (2010 to 2019.) The data points contain Geographic Diversification and ROA. I would like to generate the average ROA for the following conditions:
Average ROA by Company for pre-crisis and post-crisis years separately and where Geographic Diversification>1.4
I tried the following command but I do not think the results are correct:
Code:
egen AvgROApreCrisis = mean(ROA) if inrange(Year,2001,2006) & GeographicDiversificationr>1.4, by(Company)
0 Response to Generating Mean Values for a variable based on 2 conditions in Panel Data
Post a Comment