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
stpm2 tvc df graphGood morning. I am a researcher unfamiliar with stpm2. I have some questions regarding stpm2 executi…
Extract date from a string variable containing other textHello Experts, I have poorly entered data where date is embedded within text (var1). I need to extr…
stpm2 graphGood morning. I am a student unfamiliar with stpm2. I have a rudimentary question regarding stpm2. F…
Unable to open asdoc tables in wordHello people! As the title already states I cannot open asdoc tables anymore in word. Instead, I get…
Unknown correlation between regressorsDear Statalist, I am grateful for any help on the following question: I have several datasets, eac…
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