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

Re: st: RE: STATA reads numbers as strings


From   "Joseph McCrary" <joemccrary@fastmail.fm>
To   "Statalist" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: RE: STATA reads numbers as strings
Date   Fri, 28 May 2004 08:52:32 -0400

A bit late, but...

One thing I've done in the past is read the variable once as a string and
then again as a number. Then you can find those cases for which the
numeric version of the variable is missing. At that point, look at the
string version to see what the problem is. I did this when I did not want
to dump a whole lot of cases because of the way DSM codes were entered
into a database. I was able to go back and fix the variables so that I
lost many fewer cases.

Joe


On Tue, 11 May 2004 17:36:27 +0100, "Nick Cox" <n.j.cox@durham.ac.uk>
said:
> Some relevant links: 
> 
> http://www.stata.com/support/faqs/data/allstring.html
> 
> http://www.stata.com/support/faqs/data/newexcel.html
> 
> http://www.stata.com/support/faqs/res/statalist.html#spell
> 
> Nick 
> n.j.cox@durham.ac.uk 
> 
> jdubas@nd.edu
>  
> > I keep trying to import data (csv file) that are all numbers, 
> > but STATA reads
> > some of them as string.  How do I get STATA to read it properly?
> 
> *
> *   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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index