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/