Wonderful, it worked!
Many thanks for the prompt response!
Mohamad
Hi,
I am wondering if you can help me. I am trying to get a cumulative sum
of AAR below by dif group. So I need the CAAR to do something like
this:
dif AAR CAAR
1 2.2 2.2
1 2.2 2.2
1 2.2 2.2
1 2.2 2.2
2 6.6 8.8
2 6.6 8.8
2 6.6 8.8
2 6.6 8.8
3 1.4 10.2
3 1.4 10.2
3 1.4 10.2
I cannot do by line because because the groups vary in number of
sub_occupants. I need to do it by group, can you help me?
Thanks,
. by diff, sort: gen CAAR = AAR if _n==1
. replace CAAR = sum(CAAR)
--
[email protected]
+49 (0)30 25491-361
--
Mohamad Al-Ississ
Candidate, Masters in Public Administration
in International Development,
Kennedy School of Government
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/