Statalist


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

RE: st: different result each time


From   "Rajesh Tharyan" <[email protected]>
To   <[email protected]>
Subject   RE: st: different result each time
Date   Thu, 25 Sep 2008 14:07:31 +0100

Hi all,

Thanks for the pointers.  The merge is a nightmare


I have one dataset like this


Co1 anndate1
Co1 anndate2
Co2 anndate1
Co3 anndate1

In this dataset each co anndate combination is unique

And the other as 

Co1 dealdate1 
Co1 dealdate2 
Co1 dealdate3
Co1 dealdate4
Co1 dealdate5
Co1 dealdate6
Co2 dealdate2
Co2 dealdate3
Co2 dealdate4

In this dataset each co dealdate combination is unique i.e. I don't have for
example two co1 dealdate1 etc.

The idea of the merge is that for each co anndate combination I need to get
all the dealdates with x days before and after the anndate. So I do a many
to many merge and drop all deal dates that fall outside this range. I am not
sure how to do this apart from a many to many merge. Is there another way?


Rajesh Tharyan 
Tel: +44 (0)1392 262544
Fax: +44 (0)1392 262475
E-mail: [email protected]

Times Higher Education University of the Year 2007/08


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Eva Poen
Sent: 25 September 2008 12:42
To: [email protected]
Subject: Re: st: different result each time

Wouldn't you need the latter of the cases you mentioned (merge
variables don't uniquely identify observations in both datasets) for
this to happen? I think you'd get the same result if you have
uniqueness in one dataset. I made up a little example. The second
merge produces different results in both runs, while the first merge
produces identical results.




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index