Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: comparing between observations


From   <[email protected]>
To   <[email protected]>
Subject   st: comparing between observations
Date   Tue, 24 Sep 2013 13:17:42 +0000

I have a large dataset in which I have to identify and index admission to the hospital for copd.  I have created a variable that codes for hospital admission and admission for copd, copdadmit, where 1 equals yes.  The other part of index admission is that the encounter to the hospital cannot be within a 30day window of discharge any other admission for copd.  For example, if patient A has a COPD admission on feb 1to feb 5 and then again is admitted for COPD on feb 15, since feb 15 is within 30days of discharge date of feb 5, this second admission should not be considered an index admission.  I ranked all of the copd admits and I have admission and discharge dates.  How do I identify the copd admits that should not be considered index admits? Also it might be that the second and third ranked observations also fall within 30days of the discharge date from the first.

My variables and example 
Copdadmit, admdt, dischdt, obsrank
1, 02feb2006, 04feb2006, 1
1, 22feb2006,  23feb2006, 2
1, 27feb2006, 28feb2006, 3
1, 04may2006, 08may2006, 4

Thanks!
Tina


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index