Statalist


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

st: RE: Selecting subjects


From   "Zhiqiang Wang" <[email protected]>
To   <[email protected]>
Subject   st: RE: Selecting subjects
Date   Thu, 13 Mar 2008 09:43:14 +1000

Let's assume your variables are 1) time = 0, 2, 4, 8,...52, 999 and 2)
patient identification - id. 

There may be several alternatives. The following is one of them.  
. egen v1 = max(time), by(id)
. gen v2 = v1 != 999

Zhiqiang Wang, PhD
School of Medicine, University of Queensland

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ziad
El-Khatib
Sent: Thursday, 13 March 2008 9:19 AM
To: [email protected]
Subject: st: Selecting subjects

Dear STATA lister, it might be simple question...

I have cohort followed over 12 months. Time points have 2 variables:
   visit: coded after the number of weeks on treatmnet:
0,2,4,8,12,16,20,24,36 & 52 (patients expected to come on these weeks)
otherwise coded 999 if unexpected visit.
   week: showing the exact week number patient came to clinic.

I am trying to generate variable with value=1 to select patients who
came at all visits (mentioned above), with intention to identify
patients who did not come to the expected appointments.


Any tips about it?

Thank you in advance 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/

*
*   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