Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: about the missing values


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: RE: about the missing values
Date   Sat, 17 Oct 2009 14:07:22 -0400

N/A usually means Not Available or Not Applicable, so I suppose
someone typed these in Excel when they did not have a number.
Excel will also display #N/A when a formula in a cell has an
error.

If your variable is a string, then there is no "missing" token
other than an empty string (""). In the data editor this will
appear as an empty box.

If you want a string variable to be a number (and sometimes
Stat/Transfer makes the wrong chice about this), you can

 gen newvar = real(myvar)
 replace newvar=0 if missing(myvar)

to generate a new variable -newvar- which is a numeric version
of your string variable, and replace the numeric missing values
"." with 0.

If you want to keep it string, but use something besides "" to
indicate missing, such as "N/A", you can do this:

   replace myvar="N/A" if missing(myvar).

hope this helps,
Jeph

amatoallah ouchen wrote:
Professor Martin, thanks a lot for your quick answer,

in fact I've used stata transfer to transfer a data set from an excel
spreed sheet to  a stata format,

the format of my  missing values on the  excel spreed sheet  are #N/A.

When I've transformed them to stata, sometimes I'get the "." and
others just   complet empty boxes.

perhaps the problems in on the format of the variables, when I'm
getting the "." the format is byte but  the problem appears when the
format is string

any hints?

thanks a lot in advance.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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