Hi. I have a (company ID-time) panel data. Now I have to calculate standard deviation of variable COGSQ from quarter I/1983 to quarter II/1983, and then quarter I/1983 to quarter III/1983, and so on..... So basically, for company with GVKEY 001001; t=0 is quarter I/1983 at t=1 (QII/1983), I need to find standard deviation of X from t=0 to t=1 at t=2 (QIII/1983), std of X from t=0 to t=2 and so on, Do you have any idea how to do this? So the dataset is like this gvkey datadate Company COGSQ STD 1001 19830331 A 1.258 NA 1001 19830630 A 1.4 std from QI/1983 to QII/1983 1001 19830930 A 1.5 std from QI/1983 to QIII/1983 1001 19831231 A 1.6 …….. …… ……. ……. 1001 19860331 A 2.3 1002 19840430 B 3.5 1002 19840731 B 6.5 ….. …… ….. …..
... View more