hello statalisters,
I am trying different ways to detect outliers in my database. I use this code that I found in one of the forum posts :
foreach var of varlist A-C {
quietly summarize `var'
g Z_`var'= (`var' > 3*r(sd)) if `var' < .
list `var' Z_`var' if Z_`var' == 1
the problem is that with this code it is only applied for the observations in the top but not for those in the buttom. I tried to modify it but I failed.
any help would be appreciated
thank you
I am trying different ways to detect outliers in my database. I use this code that I found in one of the forum posts :
foreach var of varlist A-C {
quietly summarize `var'
g Z_`var'= (`var' > 3*r(sd)) if `var' < .
list `var' Z_`var' if Z_`var' == 1
the problem is that with this code it is only applied for the observations in the top but not for those in the buttom. I tried to modify it but I failed.
any help would be appreciated
thank you
Comment