Statalist The Stata Listserver


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

RE: st: RE: puzzling "missing" before and after "gen newvar = mdy(a, b, c)"


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: puzzling "missing" before and after "gen newvar = mdy(a, b, c)"
Date   Fri, 12 Jan 2007 15:54:47 -0000

I suggest we sort this out off-list so long as you 
are willing to send me a copy of your data. 

Nick 
[email protected] 

Michael McCulloch
 
> I'm sorry; sent the wrong commands. What I meant to send was:
> 
> Very elegant! However, it misses the "99"'s. Example:
> . describe datedx
>                storage  display     value
>          variable name   type   format      label      variable label
>          
> --------------------------------------------------------------
> -----------------
>          datedx          double %10.0g                 DATE 
> OF DIAGNOSIS
> . drop if substr(string(datedx),5,2) == "99" | 
> substr(string(datedx),7,2) 
> == "99"
> (0 observations deleted)

*
*   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