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

st: RE: RE: RE: RE: RE: tabulation of variables


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: RE: RE: tabulation of variables
Date   Mon, 23 Sep 2002 16:55:22 +0100

Banya, Winston
>
> Thanks Nick [Winter]. It seems to work but some of the variables are
> not numeric and
> so when I took that into account I am geeting an error message.
>
> I wrote in  the last line you sent me: list 'v2' if 'v1'==.
> | 'v1'=="&" and
> then the error message was that 'v1'is an invalid name.
> Note the in this
> database the missinbg value for a string variable is
> designarted as &. How
> can I modify it ?

Whatever the variable,

`v1' == . | `v1' == "&"

will be illegal. If the variable is numeric,
then it cannot be compared with a string,
and indeed vice versa.

I would replace

"&"

by

""

and use -missing()- in any case
to test for missings. That will work
across numerics and strings.

Nick
[email protected]

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