Statalist The Stata Listserver


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

st: in search of merge modification


From   "Beaulieu, Emily A" <[email protected]>
To   <[email protected]>
Subject   st: in search of merge modification
Date   Fri, 15 Sep 2006 13:30:22 -0400

:01C6D8EC]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hsphsun2.harvard.edu=
  id k8FHUc828745
Sender: [email protected]
Precedence: bulk
Reply-To: [email protected]
Errors-To: [email protected]
I am hoping to be able to perform a match-merge of 2 data sets where both s=
ets have unique (country, date) observations [where the date variable is a =
STATA numeric date], but the dates in the 2 data sets, are not a direct mat=
ch.=A0 The countries will match, and what I would like STATA to do is match=
  the dates in memory to the closest preceding dates in the "using" data set=
, for any given country.=A0 I would also like to perform a separate merge, =
having STATA choose the closest following date in the data set.=A0 I have n=
o programming experience in STATA, but it seems like there should be a way =
to accomplish this.=A0 My three questions for the list are as follows:

1. Is there a simple way to accomplish this with the merge command that I h=
ave simply missed in reading everything I can find about merge?
2. Has someone already created a program to do what I am trying to accompli=
sh?
3. If the answers to 1 & 2 are "no", does anyone have suggestions for where=
  I would begin to learn how to write such a program?

Thanks!

Emily Beaulieu
Assistant Professor
Department of Political Science
University of Kentucky
1615 Patterson Office Tower
Lexington, KY 40506
(859) 257-9677


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