Dear Statlist community,
Despite being a very simple question, I did not figure how to perform this command through my textbook or by reading previous topics by searching through this forum. If this has been discussed earlier, I would be very grateful if someone could redirect me.
I have huge datasets where I want to check for groups of specific string-values in a specific variable. This can be done by "list in if variable == "value"", but this seems to be very ineffective, time-consuming, and computationally expensive. Also, in many instances, I want only to check if the value contains a set of letters at the beginning of the string value. An example can be that I want to check for whether the variable icd_10 in a certain dataset contains the value of C31 (but this can typically contain values of C310, C311, C312, etc - but I want to check C30 as a group).
Kind regards,
Haakon
Related Posts with Checking for specific string values
Invalid Syntax r(198)Hi everyone, I was wondering if I could get help to figure out the problem with one of my commands.…
gsample procedure for frequency weights vs. probability weights?Question re: 'gsample' procedure. I am currently analyzing the Healthcare Utilization Project (HCUP…
Post-estimation test of the reg3 commandHi, I have been grappling with -reg3- command which implements 3SLS for a system of equations. Tryi…
Statalist reputation bars under nameUsually very active members on Statalist have orange bars under their name. I noticed some orange ba…
Invalid Syntax r(198)Hi everyone, I was wondering if I could get help to figure out the problem with one of my commands.…
Subscribe to:
Post Comments (Atom)
0 Response to Checking for specific string values
Post a Comment