Dear All, The following question comes from http://bbs.pinggu.org/thread-6298239-1-1.html.
The end is to obtain, for each `group_id', the standard deviation of `var1' from the very first observation till the current observation (in the order of `order').
Any suggestion is highly appreciated.
The end is to obtain, for each `group_id', the standard deviation of `var1' from the very first observation till the current observation (in the order of `order').
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(group_id var1 var2 order) 1 2 3 1 1 4 2 2 1 4 5 3 1 3 1 4 1 2 2 5 2 2 3 1 2 4 2 2 2 4 5 3 2 3 1 4 2 2 2 5 2 2 3 6 2 4 2 7 2 4 5 8 2 3 1 9 2 2 2 10 end
Comment