Statalist


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

RE: st: Seeking help in stata


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Seeking help in stata
Date   Fri, 14 Dec 2007 16:40:51 -0000

Yes, good idea. In so far as "A" and "X" are the only alphabetic
characters, then 

. list if missing(real(codeks)) 

will identify any observations with "A", "X", "AX" within -codeks-, 
and no others.
Note that no intermediate variable is needed for that purpose.  

Gabi Huiber

This solution is not general, in that it assumes that all the codeks
values that do not include A, X, or AX are numeric strings. If that is
the case, Badi could simply do this:

gen x=real(codeks)

and x will show a missing value everywhere codeks shows A, X, or AX.

Then it won't be too hard to say

gen codeks_ax_dummy=(x==.)
drop x


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