Hello everyone,
I have a set of categorical variables which have certain value labels attached to their value. I want to change (using loop) the value labels if these labels contain certain words. For example,
Var1 has three values 1, 2, 3 and the respective value labels are "Bottle Large Red", "Bottle Small Black", "Bottle No data"
I want to change all the value labels to "The bottle is large and red" if the value label contains words "Red" & "Large"; to "The bottle is small and black" if it contains words "Black" & "Small". No change if the value label does not contain all the that words I specify.
I hope I am clear in asking my question. Kindly advise how can I do this.
Thanks.
Amit
Related Posts with How to modify value labels based on certain words already present in value labels
Exporting two way table to latexHi, I have two string variables Var1 and Var2 each with 7 categories. I want to create a two way ta…
CMP mata error 3900Hi all, I was trying to use State to run a CMP model with random coefficient. And I got the error b…
Function HandlesIs there something similar to MATLAB's function handles in MATA? It seems like it would be similar t…
Importing data - 1st row (names) not correctlyHello, I want to import an excel spredsheet and use the first row as the name of the variable. For t…
Generate a date variable from another date variable with an if conditionHere I am trying to create a start date (AESTDAT) and end date (AEENDAT) variables from the list bel…
Subscribe to:
Post Comments (Atom)
0 Response to How to modify value labels based on certain words already present in value labels
Post a Comment