Bookmark and Share

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

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

st: Data conversion

From   Hugo Fontan Köhler <>
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.


*   For searches and help try:

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