Dear All
I have data on GDP (var= gdp) for different countries (var = iso) , for different years (var=year). My data is in long view. I would like to generate a new variable that calculates the average GDP over the proceeding 10 years for each year for each country. I know i need egen and by sort, but am struggling! Any help would be much appreciated!
Many Thanks
Joe
I have data on GDP (var= gdp) for different countries (var = iso) , for different years (var=year). My data is in long view. I would like to generate a new variable that calculates the average GDP over the proceeding 10 years for each year for each country. I know i need egen and by sort, but am struggling! Any help would be much appreciated!
Many Thanks
Joe
Comment