Hi Guys,
I'm using STATA 13 with windows 10 OS.
I have quarterly firm observations and I want to calculate the standard deviation of earnings for 2 years window (8 quarters). I'm completely lost on how to do this. Can anybody give me some directions? I'm sending a pick of my dataset bellow (I have more than one firm id)
I'm using STATA 13 with windows 10 OS.
I have quarterly firm observations and I want to calculate the standard deviation of earnings for 2 years window (8 quarters). I'm completely lost on how to do this. Can anybody give me some directions? I'm sending a pick of my dataset bellow (I have more than one firm id)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str6 ibtic float(anndatsq anndats EPS_sup) "AA2G" 16204 16544 0 "AA2G" 16296 16544 -.06 "AA2G" 16383 16544 .01 "AA2G" 16544 16544 -.05 "AA2G" 16685 16909 -.18 "AA2G" 16761 16909 .33 "AA2G" 16909 16909 -.08 "AA2G" 17027 17258 .13 "AA2G" 17119 17258 -.1 "AA2G" 17258 17258 -.01 "AA2G" 17301 . . "AA2G" 17387 17622 .5 "AA2G" 17484 17622 .33 "AA2G" 17622 17622 .73 "AA2G" 17667 17979 1.66 "AA2G" 17744 17979 .34 "AA2G" 17849 17979 1.47 "AA2G" 17979 17979 -.01 "AA2G" 18029 18350 -.36 "AA2G" 18122 18350 1.72 "AA2G" 18213 18350 .76 "AA2G" 18350 18350 . end format %td anndatsq format %td anndats
Comment