Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: destring, werdiness


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: destring, werdiness
Date   Tue, 11 Feb 2014 18:32:41 +0000

When you say Stata converted numbers to strings, note that Stata
usually has a good reason for this, namely that you are importing
stuff that is not numeric.

First problem:

Non-numeric characters are easily found in a string variable -strvar-

tab strvar if missing(real(strvar))

The non-numeric characters would stand in the way of the function
-real()-, and so it would yield missing. This tabulation may yield a
long table, but it would usually indicate the problem(s), which may
well be something you can deal with using -destring- options.

Second problem:

Please give an example.

Nick
[email protected]


On 11 February 2014 17:53, Marie-Eve St-Onge
<[email protected]> wrote:

> I'm frustrated because I can't make Stata destring few variables.
>
> In the first case there are only long numbers in a variable of which I already replace "NA" to missing. However, Stata still says that there arenonmumeric characters. Is there a way to check out where such nonmumericvalues are?
>
> In the second case, Stata converted exponential numbers to string, so when I asked to destring it also say there are nonmumerical characters. Does anybody have a clue on this?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index