Statalist The Stata Listserver


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

st: Getting the latest "previous date"


From   "Gustaf Rydevik" <[email protected]>
To   [email protected]
Subject   st: Getting the latest "previous date"
Date   Tue, 12 Dec 2006 10:21:05 +0300

Hi list,

I have a set of observations, and for each observation I have  one
event date and n visit dates. How would I go about to get the date for
the last visit that occured before my event?
I'm guessing to use something like egen lastvisitdate=
rmin(eventdate-visitdate*), bu a) I'm not allowed to do that, and b) I
don't know how to only return positive values.

Hope I've been clear enough.

many thanks,

Gustaf


--
email:[email protected]
tel: +46(0)703051451
address: Kantorsgatan 50:190 75424 Uppsala Sweden
*
*   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