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]

st: Data conversion


From   Hugo Fontan Köhler <[email protected]>
To   [email protected]
Subject   st: Data conversion
Date   Wed, 23 May 2012 10:49:04 -0300

Dear Statalisters,

I have a database with (originally in bDase format, convertd to xls in
Excel and imported in Stata) with a string variable in the format Ia,
Ib, and so on. I want to convert this variable in a numeric one. I
tried to generate a new variable with missing values (generate pZ=.)
and use replace (replace pZ = 1 if Z="1"), but I always get a type
mismatch error (r109). I managed to convert strings to dates but I
can't convert to numbers.
I would appreciate any suggestions.

Thanks,

Hugo
[email protected]
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index