Statalist The Stata Listserver


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

st: Count number of observations in date range


From   Jarl Svartsj� <[email protected]>
To   [email protected]
Subject   st: Count number of observations in date range
Date   Thu, 19 Apr 2007 14:44:05 +0200 (CEST)

Dear Statalist,

I have two date variables in my dataset, which define
the start and end dates for a certain event. For each
observation in the dataset, I'd like to count the
number of other observations in the dataset that
overlap with this event window.

I.e.

Event	Start date	End date	Simultaneous events
-----------------------------------------------------------------------------------
XYZ	11jan04		07feb04		???
ZZZ	11jan04		08feb04		???
YYY	14jan04		22jan04		???
XXX	21jan04		13mar04		???
ZZY	30jan04		04feb04		???

aso.aso.

Which command should I use?
Thanks!

-JS


      
_________________________________________________________
Flyger tiden iv�g? F�nga dagen med Yahoo! Mails inbyggda
kalender. Dessutom 250 MB gratis, virusscanning och antispam. F� den p�: http://se.mail.yahoo.com
*
*   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