Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: coding question


From   "Ziad El-Khatib" <[email protected]>
To   [email protected]
Subject   st: coding question
Date   Tue, 29 Jan 2008 20:52:43 -0800

Thank you for the tips about the book, order it and waiting to come.

Question how to calculate variable representing cumulative value 'cumulad'

= [(total n pillmissed per patient at all visits) / (total n pillspres
at all visits)] * 100

example below, any tips?


patientid          visitn          pillspres          pillmissed
   cumulad
------------          -------          ------------
---------------          ------------
1001                 1                 30                     2
1001                 2                 20                     5
1001                 6                 50                     1
1002 etc..



Thank you and best regards
ziad
*
*   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/



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