Hello,
I am trying to measure the volatility of country- and industry-adjusted return on asset (σ(ROA)). For each year, I have to compute the difference between a firm’s ROA and the average ROA across all firms in the same four-digit SIC industry and from the country in which the company is registered.
For the cross-sectional regressions, I calculate the standard deviation of the adjusted return on asset for each firm over the entire sample period (1999–2007):
egen averageroa=mean(roa), by(industry country)
bys FirmName (year): gen diff=roa-averageroa
bys FirmName (year):egen vol=sd(diff)
For the panel regressions, I have to measure the standard deviation of the adjusted return on asset for each firm over five-year overlapping periods (1999–2003, 2000–2004, 2001–2005, 2002–2006, and 2003–2007). How can I do that in stata?
Thank you.
Yilmaz
I am trying to measure the volatility of country- and industry-adjusted return on asset (σ(ROA)). For each year, I have to compute the difference between a firm’s ROA and the average ROA across all firms in the same four-digit SIC industry and from the country in which the company is registered.
For the cross-sectional regressions, I calculate the standard deviation of the adjusted return on asset for each firm over the entire sample period (1999–2007):
egen averageroa=mean(roa), by(industry country)
bys FirmName (year): gen diff=roa-averageroa
bys FirmName (year):egen vol=sd(diff)
For the panel regressions, I have to measure the standard deviation of the adjusted return on asset for each firm over five-year overlapping periods (1999–2003, 2000–2004, 2001–2005, 2002–2006, and 2003–2007). How can I do that in stata?
Thank you.
Yilmaz
Comment