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]

Re: st: comparing between observations


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: comparing between observations
Date   Tue, 24 Sep 2013 15:50:01 +0100

If the focus is on _admission_ dates alone, then -panelthin- (SSC)
sounds right for you.
Nick
[email protected]


On 24 September 2013 15:46,  <[email protected]> wrote:
> Thank you for the quick replies! Regarding Rich's question, if the first observation is the index copd admission, and the second is also for copd but falls within 30 days of the first then the second is not considered an index copd admission.  If the third observation is for COPD and falls more than 30 days from the first, I want to label third observation as a index copd admission also and it does not matter its relation time-wise to the second. Hope that wasn't too convoluted
>
>
> Tina Shah MD MPH
> Pulmonary and Critical Care Fellow
> Pager 3543
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Richard Goldstein
> Sent: Tuesday, September 24, 2013 8:50 AM
> To: [email protected]
> Subject: Re: st: comparing between observations
>
> note that there is an ambiguity in the question and that Nick's answer makes an assumption about that ambiguity: what if the third observation is not within 30 days of the first discharge but is within 30 days of the second discharge (and the second admission is within 30 days of the first discharge?
>
> Rich
>
> On 9/24/13 9:35 AM, Nick Cox wrote:
>> Check out -panelthin- from SSC. Alternatively, the time since the
>> previous discharge is just
>>
>> gen lapse = admdt - dischdt[_n-1]
>>
>> making sure that you omit all the non-COPD admissions, or equivalently
>> -sort- them aside.
>>
>> You describe your data as if you have just one patient, which seems
>> unlikely, but the previous statement can be generalised by something
>> like
>>
>> bysort patientid (admdt) : gen lapse = ...
>>
>>
>> Nick
>> [email protected]
>>
>>
>> On 24 September 2013 14:17,  <[email protected]> wrote:
>>> 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/
>
> *
> *   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/

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