I am a frequent reader of Statalist,
I am using Stata 15.1.
I am trying to replicate a paper on business cycle titled:
HTML Code:
Macroeconomic Volatility and External Imbalances by Perri and Fogli (2014)
So my questions are:
1. how do I implement the following formula in Stata
2. If I choose 40 quarters as my window, what does middle of a window mean (my understanding was the sd calculated using window=40 is placed halfway between these quarters) and I doubt this option is available in rangestat or asrol
I would really appreciate any hint.
Thank you in advance.
Array
Code:
rangestat (sd) sd_gdpg= gdpg, interval( time -40 0) by( ccode ) rangestat (sum) sumsdo_gdpg= sd_gdpg (count) counto_gdpg= sd_gdpg , interval(time -40 0) by(time) excludeself gen meansdo_gdpg=sumsdo_gdpg/counto_gdpg gen rel_volgdpg = sd_gdpg - meansdo_gdpg
0 Response to Rolling sd
Post a Comment