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?
Identifying "Episodes"Hello All, I am doing a difference-in-difference analysis. I need to create an identifier, or a var…
No constant in first difference regressionI am running a first difference regression. I have seen the nocons option included on several posts …
keep banks (id) with 3-consecutive years of observation or more in my panel dataGreetings statalist users, I need help with codes to eliminate the entire id (along with all its ob…
Using -margins- for different subsamplesHi everyone, margins, atmeans saves the means of covariates of a model in a matrix r(at), see here:…
Resolving problem with day gaps in STATAI am a new STATA user and new to this forum. I am working with daily price data of the Australian do…
Subscribe to:
Post Comments (Atom)
0 Response to How to remove all characters that are not part of a predefined list?
Post a Comment