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
Examine treatment effect at different follow-up periods in difference-in-difference analysesHi Statalisters I want to examine the effect of an intervention at different follow-up points. I'm …
Internal validation of risk prediction model - Bootstrapped method.Dear expert. I am testing accuracy of a risk score (Continious) on predicting mortality (binary 0:1)…
if [varname] = [values]?Hello, I have a variable, date that is empty. and a series of other date variables that contain dat…
retrospective power analysis on panel dataHi statalisters ... I need some help to carry out a power test over data I obtained from one experim…
Date Variable to show only yearHello, I was trying to make the date variable below into a yearly variable. I did the following: ge…
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