Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: ordering dates


From   "Terra Curtis" <terra.curtis@cambridgefinance.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: ordering dates
Date   Fri, 23 Sep 2005 11:13:06 -0400

Dear Statalist,

I have a dataset like the sample shown below:

firm	patent	stageatsigning	date		awddate2	stagedummy
.
.
.
285	4401756				12/01/96	08/30/83	0
285	4401756				11/01/84	08/30/83	0
285	4401756				01/01/93	08/30/83	0
285	4401756				09/01/93	08/30/83	0
285	4401756				08/01/94	08/30/83	0
285	4401756				09/01/90	08/30/83	0
285	4401756				04/01/96	08/30/83	0
285	4401756				12/01/95	08/30/83	0
285	4401756				10/01/96	08/30/83	0
285	4401756				07/01/88	08/30/83	0
285	4401756	Approved		12/01/92	08/30/83	0
285	4401756	Discovery		02/01/92	08/30/83	0
285	4401756	Discovery		02/01/95	08/30/83	0
285	4401756	Discovery		01/01/86	08/30/83	0
285	4401756	Discovery		01/01/96	08/30/83	0
285	4401756	Formulation		08/01/95	08/30/83	0
285	4401756	Lead Molecule	09/01/85	08/30/83	0
285	4401756	Lead Molecule	10/01/81	08/30/83	0*
285	4401756	Lead Molecule	04/01/83	08/30/83	0**
285	4401756	Lead Molecule	04/01/93	08/30/83	0
285	4401756	Lead Molecule	10/01/84	08/30/83	0
285	4401756	Phase I, Approved	01/01/92	08/30/83	0
285	4401756	Phase II		12/01/93	08/30/83	0
285	4401756	Preclinical		04/01/96	08/30/83	0
.
.
.

What I want to do is determine which 'stageatsigning' the patent was in at
the 'awddate2'  So, for this example, I want to replace stagedummy=1 on the
line marked with * since the 'awddate2' is between the 'date' on that line
and the date on the line marked **.   Any suggestions for how I could do
this?

Thanks,
Terra

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index