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
outreg2 not suitable for exporting logistic regression with a categorical outcome? (logit......)Dear all, I have been using "outreg2" as a command to export my regression tables into excel sheet. …
Merging household census data for logistic regressionGood evening everyone, First, I'd like to say thank you to all of these helpful users from which I …
IVProbit for % Dependent Variable with Quadratic Endogenous RegressorHello, After reading through online sources including here with @Jeff Wooldridge, Richard Williams …
MI & GSEMMorning, I am looking to run a path analysis (two variables measured at two time points) using gsem…
Collapse to obtain mean, p25 and p75Hello, I need to collapse my dataset for a forestplot which will illustrate heterogeneity in outcom…
Subscribe to:
Post Comments (Atom)
0 Response to Standard deviation of industry-adjusted return on assets over five years
Post a Comment