I am trying to learn the foreach loop command in Stata 13.0.
I want to label multiple variables using the foreach loop but whenever I enter the command below,
OR
I get an invalid syntax error message.
What could be the problem with the above command?
I will be grateful if someone can point me to any document or resource
regarding the above problem.
I want to label multiple variables using the foreach loop but whenever I enter the command below,
Code:
sysuse auto.dta, clear foreach x of varlist make - foreign{ label variable `x' `x' "for survey one" }
Code:
sysuse auto.dta, clear foreach x of varlist make - foreign{ label variable `x' " `x' " "for survey one" }
Code:
invalid syntax
I will be grateful if someone can point me to any document or resource
regarding the above problem.
Comment