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

st: merge using interval data


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: merge using interval data
Date   Mon, 25 Oct 2004 16:40:27 -0400

Rich wrote

the reason not to do what Kit suggested is that there are multiple
records/provider as there is a new contract at least once per year
(of course, I suppose that I could "fix up" the provider file and
then do this ....)

No, you would not want to expand the big dataset this way. But you could do the following. Split up the provider file into those with contracts ending in 1999, those ending in 2000, those ending in 2001, etc. -- separate files. Merge them sequentially with the master file, and update the 'status' variable iff it is missing. In the absence of some SQL logic, I think that would work pretty well (and would not require expansion of the master file).

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index