Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: merge using interval data


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: merge using interval data
Date   Mon, 25 Oct 2004 10:32:03 -0400

try -findit nearmrg-

I wrote it for rounded value look ups.  I haven't looked at the code in a
while, so it may not be as efficient as you need given the size of the
master dataset, but it could at least be a decent start on your problem.

Michael Blasnik
[email protected]

----- Original Message ----- 
From: "Richard Goldstein" <[email protected]>
To: "statalist" <[email protected]>
Sent: Monday, October 25, 2004 8:38 AM
Subject: st: merge using interval data


> While I have an answer to my problem (see below), I wonder
> whether anyone has an idea for a more efficient procedure.
>
> The issue: I have two data sets, one large (gigabytes) with
> individual data including a unique id and a date of occurrence
> of a service being provided.
>
> I need the status of the provider on the date of occurrence
> for each case.  I have a second data set that includes, for
> each provider their status as of a period of time (e.g.,
> a beginning and ending date for a contract).
>
> I need to merge the two so that the provider's status is
> included in the individual data set.
>
> The only solution I currently see involves expanding the
> provider data set so each possible data (from the beginning
> of the contract to the end) is covered and then merging the
> two data sets (using the nokeep option).  However, this
> strikes me as inefficient.
>
> Any other suggestions would be greatly appreciated.
>
> Thanks,
>
> Rich Goldstein


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