Hi People,
I need to write down a command that has too many variables but I do not want to write down all of the variables that I use. Suppose that I have var1, var2,...to Var12 and I want to have a command like:
replace Dot=Quick if var==0 & var2==0 & ....& var12==0.
Is there a way to make a shortage of that? I tried possible different varlist definitions like:
replace Dot=Quick if var*=0
but they do not seem to work.
An additional question is that I tried to write a the commands within an if but Stata is not doing anything. So I wrote:
if var1==0 & var2==0 {
replace Dot=Quick
}
and it is not doing any changes whasoever. Whereas if I write it
replace Dot=Quick if var1==0 & var2==0
it does the changes. Is there a problem with my syntax of the if command?
Thanks in advance!
Regards,
Socrates
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/