Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Event time creation


From   "Auh, Jun Kyung" <jauh14@gsb.columbia.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Event time creation
Date   Thu, 18 Apr 2013 22:00:26 -0400

Hi all-

I am wondering how I can create the event time variable. For example I want to create something like this:

Time         	Event 	EventTime 
2000m1		No	-2
2000m2   	No	-1
2000m3		Yes	0
2000m4		No	1
2000m5		No	2

Furthermore, what I actually want to create is the following:

Time         ID	Event 	EventTime 
2000m1		No	-2
2000m1		No	-2
2000m2   	No	-1
2000m2		No	-1
2000m3		Yes 	0
2000m3		Yes	0
2000m4		No	1
2000m4		No	1
2000m5		No	2
2000m5		No	2

Could you please help me out?

Best,
JK

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index