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
Correlation matrixHello, I would like to do the correlation matrix between variables P_1, P_5, P_10 P_15, F_1, F_5, F…
Simple for-dummies examples of using scons with StataDear Statalisters, I was wondering if anyone knew of or could share some simple "for-dummies" examp…
-xtoverid- or Variable Addition Test (VAT)Dear community, after having found heteroscedasticity and autocorrelation in my panel data, I accou…
A small clarification!I produce here two codes with a slight difference that produce the same output. These codes are base…
Interpretation of testparm after missing F valuesHi all, After adding clustered standard errors to my probit model, the F values were missing. After…
Subscribe to:
Post Comments (Atom)
0 Response to Checking for specific string values
Post a Comment