Stata: Assign labels to range of variables with a loop
问题 Let's say I have 60 variables, none with similar naming patterns. I want to assign labels to all variables, which I stored locally. So for example local mylabels "dog cat bird" However I am struggling with the exact expression of the loop. Do I have to store my variable range globally and then use a foreach? Or do I use forvalues? Edit: I was referring to variable labels. I managed to create a loop, similar to the method used here http://www.stata.com/support/faqs/programming/looping-over