[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Creating non-overlapping events

From   Kaspar Dardas <[email protected]>
To   [email protected]
Subject   st: Creating non-overlapping events
Date   Tue, 24 Nov 2009 16:08:23 +0100

Hello together,

I have the following problem. I need to create a non-overlapping event
data set. I have two date variables 1st: "eventdate" which is the
start of the event and 2nd: "postdays", which is the end of the event.
 The length of the event is exactly 20 days (which is, of course, the
difference between "eventdate" and "postdays"). If two events overlap
(which happens in trade 1 and 2, in the example below)  I only take
the first event and drop the 2nd (trade 2).
How can I do this in Stata? I have about 140000 trades, several
thousands companies etc....

trade         companyname                  name         eventdate
1               Company A             Margetts, Rob      14-Feb-03
2                Company A            Margetts, Rob       17-Feb-03
3                Company A            Margetts, Rob      14-Nov-03
4                Company A            Margetts, Rob       14-May-04
5                 Company A           Margetts, Rob         06-Aug-04

Many thanks for any help in advance!

*   For searches and help try:

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