Hi
I'm looking for a syntax to create a new series which excludes all values outside of 3 standard deviations from the mean of an existent series.
It would also be nice to have such a syntax which creates a series that excludes 5% of values (percentiles) from both ends of the current series distribution.
Thanks for any advice!
Exclude outliers from series
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Exclude outliers from series
series new_y = @recode(@abs(y-@mean(y))>(3*@stdev(y)), NA, y)
series alt_y = @recode((y>@quantile(y, .95))+(y<@quantile(y, .05)), NA, y)
series alt_y = @recode((y>@quantile(y, .95))+(y<@quantile(y, .05)), NA, y)
Who is online
Users browsing this forum: No registered users and 2 guests
