Hello All,
I have a problem with dropping variables. This is my small loop:
foreach var of varlist cross* {
qui su `var'
drop `var' if `r(max)'==0
}
Why is the invalid syntax comming up? What I want to do is to drop variables ( included in the varlist cross*) if they have values only of zeros or missing values. Am I missing the obvious here?
Thanks a lot!
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/