I would like to skip and not execute part of a code if a certain condition is met. In the following example I would like not summarize if var==price or var==rep78 and mpg==12 or mpg==14. I think I could do it with if else, but it would be very tedious to code it. Any other suggestion would be greatly appreciated.
Code:
sysuse auto.dta levelsof mpg, local(mpg) foreach i in `mpg' { foreach var in price rep78 headroom trunk weight length turn displacement gear_ratio foreign { sum `var' if mpg==`i' } }
Comment