Dear STATA experts,
My sample consists of firm-year observations panel with unbalanced data over the period 2008 to 2016. I would like to measure the standard deviation of the industry-ajusted return on assets known as σ(ROA) for each firm in my sample over five-year overlapping periods (2008-2012 , 2009-2013 ,..., 2012-2016).
First, I have computed the industry-adjusted return on assets for each year by using the following codes:
egen average_roa=mean(roa), by(years industry)
gen adjusted_roa=roa-average_roa
However, I am very confused regarding the computation of the standard deviation over the five-year overlapping periods. I would really appreciate any help regarding a specific code.
Many thanks,
Nour
Related Posts with Standard deviation of industry-adjusted return on assets over five years
putdocxfreqtable updated: decimals percentages, value labels not truncatedThe package putdocxfreqtable has been updated after user input. 1. The number of decimals in percen…
Creating start and stop time-variables for continuous time dependent exposure and running a Cox modelHi All I hope you can help me with this query. I have attached a simplified dataset with all the va…
Export Correlation Matrix to Excel: Putexcel No Longer WorkingHi Statalisters, I know this sounds quite trivial. I am surprised as well. I currently use Stata16 a…
reghdfe for multi- clusteringHi all, I have a panel data for 477 firms for 2006 to 2016 and need to use two way fixed effects at…
Two way clustering at Sector and Year level with two fixed effects at Firm and YearHi all, I have a panel dataset for 477 firms in one Country for 2007 to 2017. The following is the …
Subscribe to:
Post Comments (Atom)
0 Response to Standard deviation of industry-adjusted return on assets over five years
Post a Comment