Hi Stata Forum,
I am a relatively new user to STATA. I am working on a project that uses data scraped off a website that people have manually entered information into. I have a string variable that is supposed to contain a simple one phrase description "آخر جلسة" etc.
Quite a few entries contain information that should not be there, i.e. the date or multiplications of the entry:
المتابعة (إنشاء الملف) : [12008/2102/2020 آخر جلسة 2021-03-31 09:00:00] [42/2201/2020 آخر جلسة 2020-11-04 12:00:00]
المتابعة (إنشاء الملف) : [13/2114/2020 آخر جلسة 2021-02-02 13:00:00]
Most of the data has been entered correctly and the mistakes are not consistent, so I can't simply delete the first set of unneeded digits.
One of my ideas is to split the variable by the spaces and than drop values that are incorrect and than try and work all the correct values into a single column through if conditions and replace. Does this sound reasonable and are there any commands that could help make this easier?
Kind regards,
Mathew Toll
Related Posts with How to Clean String variable with errors in data entry
comparing two timelines and converting date from 1960 to 2020I have multiple timelines I am attempting to analyse. After converting the dates to a numerical form…
Newey-West regressionHi, I am trying to run a Newey-West regression, however I do not quite understand how should I choos…
Simultaneous interaction model with nonlinear equationsDear Stata users, I observe many groups of 3 individuals, and I want to estimate an interaction mod…
Attempting to export two-way cross-tabulations using tab2xl - having issues in exporting it in the format I need it to be.* I am pasting my do-file here using a common data set. ***data for question webuse auto codebook f…
How to get concise regression tables from Stata?I wanted to know what is the best way to export regression results table in the most concise/smalles…
Subscribe to:
Post Comments (Atom)
0 Response to How to Clean String variable with errors in data entry
Post a Comment