Removing outliers

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Removing outliers

Postby miorinnovo » Thu Apr 13, 2017 8:37 am

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

EViews Matt
EViews Developer
Posts: 560
Joined: Thu Apr 25, 2013 7:48 pm

Re: Removing outliers

Postby EViews Matt » Thu Apr 13, 2017 9:14 am

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)

miorinnovo
Posts: 199
Joined: Sun Mar 01, 2015 5:01 pm

Re: Removing outliers

Postby miorinnovo » Thu Apr 13, 2017 11:31 am

perfect. thanks!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 23 guests