I wonder if its possible save or store a list of variable names with a specific condition, example:
Code:
clear all
sysuse auto
ds, has (type numeric)
foreach y of varlist `r(varlist)' {
sum `y'
if `r(mean)' > 3000 local flag="major"
if `r(mean)' < 3000 local flag="minor"
di "`flag'"
}In my mind I think in use this local list names with reg command:
reg turn `list_names_ major'
Thanks in advance
Rodrigo
0 Response to Store variable names for specific condition
Post a Comment