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
Graph of event study with interaction termDear Clyde and All, I would like to graph an event study with an interaction term. I am performing …
drop observations in long panel data set if variable changes over time, ignoring missing valuesI am working with data where certain time-invariant variables, e.g. sex and birth year, are changing…
Out of sample prediction for a logit model with dummy for time effectI have a panel data which I would like to fit a logit/xtlogit for it. I added i.year as time dummies…
Multiple Regression Issues - Stata not showing any informationHi! I am trying to do a multiple regression but when I try to do it, I don't get any of the p-values…
Count variables without missings in rowHi, I have a panel data set and would like to count the number of "id"s that do not have any missin…
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