How can I remove from a STRING VARIABLE all characters that are not part of a predefined list? For example, the predefined list contains the characters 1, 2, 3, A, B, and C. If the STRING is "12A", it does not change; but if it is "14A", it will change to "1A" because "4" is not in the list. In short, I do not want to define the characters to delete but the characters to keep. Thanks
Related Posts with How to remove all characters that are not part of a predefined list?
What happen if we increase the tolerance and maximum number of iterations?When running STATA for panel data (especially for did_imputation),I was suggested by the code someti…
using a loop to remove special characters and destring a variablemy data are a five point likert scale with 21 questions. The answers were recorded as string variabl…
Confidence Interval with Graph DotDear all, I am trying to add confidence intervals to a graph dot showing the mean value of anti-imm…
How to do Mediation Analyses to SubsamplesHi Statalist Members, I am using the following code to run some mediation analyses (single mediator…
Keep only children and disregard adult children which start their own familyHello STATALIST community, I am a desperate student at the University of Konstanz in Germany and I …
Subscribe to:
Post Comments (Atom)
0 Response to How to remove all characters that are not part of a predefined list?
Post a Comment