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
required the sampled required the sampled firms to have at least five observations in the data setplease i required the sampled required the sampled firms to have at least five observations in the d…
Inference from initial statistics to get a hang of coefficient of interests Code: Earning employment Establishment Treat 27,425.41 19,458.09 3,829.57 (10,636.87) (3…
How to find lag and lead timeHello, I have this time series data looking at whether food contamination in a school district led …
Calculate average of the (pairwise) sample cross-correlationsDear forum, since this is my first post here and since I am new to Stata, I hope my post fulfills th…
urlencoding() usageHi all, Anyone understand the usage of urlencoding()? string scalar urlencode(string scalar s ,…
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