Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Sum of different values per column


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Sum of different values per column
Date   Thu, 11 Dec 2008 13:44:13 +0100

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index