Dear Statalist:
I have a set of string variables that contain each a word related to symptoms of a disease or a specific symptom. Some examples:
Obs1: VAR1: Sore ; VAR2: throat ; VAR3: EMPTY
Obs2: VAR1: Sore ; VAR2: Cough; VAR3: throat
How can I create a new variable (VAR4: “Sore throat”) that registers two words of interest (Sore & throat) in this set of string variables?
I’ll appreciate any help!
Alejandra
Related Posts with Create a new string variable containing words of other string variables
Results are generating omitted dummy variables for fixed effect panel regressionsI have the following fixed effect regression where i wanted to control for ID and year fixed effects…
logit regression with categorical variables: obtain p-value of the difference to the basecategoryHi, I am trying to estimate a logit model using survey data. I have a categorical variable (age gro…
how to keep month end data from daily data (with various month-ending dates)Dear All, I have a daily data set with different month-ending date (sometime on 27 or 28 or 29 or 30…
Forming new variable using several existing variablesHi, I am trying to create a variable "IN" that takes value from existing variables "IN_1 IN_2 IN_3 I…
If else inside for each loopI am trying to run the following code and it does not seem to be working. I want to change the refer…
Subscribe to:
Post Comments (Atom)
0 Response to Create a new string variable containing words of other string variables
Post a Comment