Line for the server...
***********
by id, sort : egen float sumpc = total(pillcount)
***********
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ziad El-Khatib
Sent: Thursday, December 11, 2008 1:27 PM
To: [email protected]
Subject: st: Sum of different values per column
Hi!
It is a cohort dataset, I want to sum one measurement over time, example
below:
id visit pillcount sumpc
101 1 20 .
101 2 40 .
101 3 20 80
102
etc..
Any tips how to create sumpc variable?
Thank you and best regards
ziad
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/