Raphael,
Try
gen cumfreq=sum(etime)
- RY
Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University
home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
[email protected]
----- Original Message -----
From: Raphael Fraser <[email protected]>
Date: Thursday, May 11, 2006 1:31 pm
Subject: st: Computing a cumulative frequency variable
> I have the following variables and would like to generate or compute
> the cumulative frequency of etime. The end result should look like
> this:
>
> id etime cum. freq
> 15 0 0
> 15 6 6
> 15 2 8
> 20 10 10
> 20 30 40
> 20 4 44
>
> Raphael
>
> *
> * 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/
>
*
* 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/