Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Invalid Syntax - Drop

From   Socrates Mokkas <>
Subject   st: Invalid Syntax - Drop
Date   Sun, 29 Oct 2006 12:11:45 +0000

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!

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index