Hello!
I'm sure this has been addressed before, but I have been unable to find a forum post or youtube video on this specific topic. My apologies!
I'm currently cleaning a raw data set. The data is from a mail survey and write in responses were coded verbatim by undergraduate research assistants. Consequently, in a number of cases, I have a few non-numeric values in what should be a numeric variable. I'm wondering what commands will allow me to edit these records.
As a specific example, in variable "acresowned", I have been trying to convert an entry of "5000ish" to "5000." The recode and replace commands, which I hoped would work, appear to be unable to edit the non-numeric records--"type mismatch" is the error. At the moment, I've resorted to manual edits in the data editor, but the lack of documented changes in a do-file make me uncomfortable.
Thank you!
Matthew Houser
Stata 15.0, Mac
Related Posts with Cleaning Raw Data--How to edit non-numeric data records using commands
Finding Most Common String Values Across VariablesHi all: I am trying to find the most common string values across variables. While I work in crimina…
Help producing line graphHi all, I have somewhat of embarrassing question. I am trying to make a line graph that displays wh…
Iterations in logistic regressionIs there any work on what affects the number of iterations required to achieve convergence in logist…
Interpretation of sdtestHi everyone, I am using the sdtest command to evaluate variances in two groupes. But in Stata's out…
Importing oddly formatted txt data into stataHi statalist, I am dealing with precinct by precinct voting results from counties in Texas. My goal …
Subscribe to:
Post Comments (Atom)
0 Response to Cleaning Raw Data--How to edit non-numeric data records using commands
Post a Comment