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
invalid name r(198) when trying to drop placeholder values from datasetNew to Stata so this may be a stupid question. I am trying to drop placeholder values from a dataset…
markstat - problem with citationsDear Stata users, I've been using the -markstat- command (version 2.1) written by @German Rodriguez…
Syntax for date format local macros based on c-class date value resulting in embedded leading spaceHello all, I frequently need to access files on a shared network that for reasons lost to time uses…
Calculating adjusted prevalence with poisson and testing interactionHi everybody, I would like to calculate the adjusted prevalence of smoking (0=non smoker, 1=current…
Putdocx in a loopHi, I am trying to create several word documents containing some text, data, and pictures, I am doi…
Subscribe to:
Post Comments (Atom)
0 Response to Standard deviation of industry-adjusted return on assets over five years
Post a Comment