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
Time-Invariant instrument variable and country fixed effects in pooled cross-sectional datasetI have following question; Can I use time-invariant instrumental variable while controlling for coun…
Break , Exit or clear nothing is working on stata 17 maybe because of a complex codingCould anyone help me to find a solution if none of - break , exit or clear doesn't work on stata 17 …
Combination Name Across Unique IdentifiersHi Everyone, I am working with a datset that has following variables: 1) mrn: unique identifier 2)…
Can I use PPML to run a long-difference regression?Dear Statalisters, I want to know whether I can estimate a long-difference regression using PPML. …
Patient Flow FrequenciesHi Everyone, I am working with a datset that has following variables: 1) mrn: unique identifier 2)…
Subscribe to:
Post Comments (Atom)
0 Response to Standard deviation of industry-adjusted return on assets over five years
Post a Comment