Page 1 of 1

Removing outliers

Posted: Thu Apr 13, 2017 8:37 am
by miorinnovo
I have a dated monthly series and I would like to remove the largest 10% in absolute terms. In other words, I want to create a new series that excludes the largest absolute observations from the original series. Any idea how to do that?

Thanks

Re: Removing outliers

Posted: Thu Apr 13, 2017 9:14 am
by EViews Matt
Hello,

Assuming that by remove you mean translate to NAs, I believe the following demonstrates what you want:

Code: Select all

series y = @recode(@abs(x) < @quantile(@abs(x), .9), x, na)

Re: Removing outliers

Posted: Thu Apr 13, 2017 11:31 am
by miorinnovo
perfect. thanks!