I have 6 numeric variables and I want to create 1 dummy variables that will be 1 if it is above its mean and 0 if not. I'd like to use a for loop to make this happen.

so if i had
Code:
foreach var of varlist q* {