I want to identify which observations in my variable has non-numeric characteristics and what is these non-numeric characteristic before I use destring and its options.
The destring command will only work if the string variable we are trying to convert to numeric contains no non-numeric characters. For example, if we have a variable coded as “0” or “1”, but in a given observation, it was coded by mistake as “1b”, the destring command will not work. When dealing with small databases, it might be easy to visually identify which observation was wrongly coded. However, this process might be difficult if we have a large database containing many observations.
Is there any Stata command that searches for non-numeric characters within a string variable and lists the observations that have this issue?
Related Posts with How to find nonnumeric characters within a string variable and lists the observations that have this issue
Interpretation of Competing Risk with stcrregI'm new to using competing risk analysis and want to make sure I'm interpreting and using it correct…
Combining variables in the variable list by countryI am looking at the dataset where I have three variable lists: life expectancy by country for specif…
Estimate the difference-in-differences estimatorHi, I restricted my wave sample from 1-10 to 9-10 and I was wondering how would i use the command b…
Multiplying observations in a variable listIn a dataset of multiple variable lists, I would like to multiply the value of only selected variabl…
save regression results for margins plotingMy question is straightforward. Could Stata save regression results so that I do not have to re-run …
Subscribe to:
Post Comments (Atom)
0 Response to How to find nonnumeric characters within a string variable and lists the observations that have this issue
Post a Comment