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
No Observation Error with correlationHi everyone, I'm very new to Stata and I am very confused my this error. I have created two variable…
Lag length in panel data Dear Statalisters, I have an unbalanced panel and was looking for a way to determine optimal lag le…
complex tag - I thinkHello, below is a case where a person has 2 rows of data and and 2 different values for the variable…
Time series dummy variableHi all, I am trying to make a time-series line plot for employment as a dummy variable (called "lfs…
Ordinal independent variable treated as continuous & marginal effects in ordinal logistic regressionHello, I am an economics student doing an undergraduate empirical dissertation using data from the …
Subscribe to:
Post Comments (Atom)
0 Response to Checking for specific string values
Post a Comment