I'm trying to label variables in a forvalues
loop on Stata version 11.2.
However, I can't get the extended string function word # of string
idiom to work:
local names `""Growth" "Mature" "All""'
forvalues i = 0/2 {
local name : word `i' of `names'
display "`name'"
}
This follows a Statalist solution, but I keep getting invalid syntax
errors.
I also tried local names Growth Mature All
, but that doesn't work either.
Is there a way to do this algorithmically?