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
Calculating Margins to Interpred Ordered LogitHi Statlisters, I am estimateing an ordered logit model within my panel data set. Code is Code: …
Specify number of iterations to fit an fmm model that is not concaveHi Statalist, I'm using fmm: logit in Stata 15.1. My dataset contains ~21000 observations and I'm t…
xtscc for panel data with fixed effectsDeal All, I am working with a large panel data (27 countries and 100 years). When doing robustness …
Panel data quality with REGHDFEHi all, I am relative new to STATA and to panel data. I have a dataset with observations of 26 state…
java.lang.NoSuchMethodError + Stata 15.1Hi, It is my first time on this website, recently I had the error regarding java in Stata 15.1 , on …
Subscribe to:
Post Comments (Atom)
0 Response to Cleaning Raw Data--How to edit non-numeric data records using commands
Post a Comment