Page 1 of 1
Removing outliers: Winsorization
Posted: Mon Sep 14, 2009 2:26 am
by andre_6043
Dear all,
I kindly ask you about Help concerning Winsorization in Eviews6.
I have quite a big panel data set with a lot of outliers. To improve the quality of the regression I would like
to remove the outliers by doing a winsorization at the 0.5% level.
Is this possible in Eviews? What is the Eviews command and how do I proceed to do the winsorization?
If this is not possible in Eviews - what are the common ways to exclude outliers and how can I do it?
Thanks in advance for your effort!
Re: Removing outliers: Winsorization
Posted: Mon Sep 14, 2009 3:47 am
by trubador
Removing outliers is a trimming process. Winsorization is more like a transformation in which you replace the outliers with a threshold quantile value. I suppose you are trying to achieve the latter. The following command will Winsorize the series "y" by %0.5 and will create a new one called "y_q":
Code: Select all
series y_q = @recode(y>@quantile(y,.995),@quantile(y,.995),@recode(y<@quantile(y,.005),@quantile(y,.005),y))
However, I suggest you using a more formal estimation method to handle the outliers than simply preprocessing the data. You might want to look at Quantile Regression Estimation in that respect...
Re: Removing outliers: Winsorization
Posted: Wed Mar 27, 2013 6:57 am
by NDB
Dear all
I want to remove the outliers of my dataset through winsorization. Therefore I create a new program and give in the follow formula:
!my_percentile = x
!quant_low = @quantile(variable,!my_percentile)
!quant_high = @quantile(variable,1-!my_percentile)
series variable_win= !quant_low*(variable<!quant_low) + variable*((variable >!quant_low) and (variable <!quant_high)) + !quant_high*(variable >!quant_high)
I ran the winsorization on a 5% level. My problem now is that Eviews changes the outliers in 0, instead of the lowest and highest value within the 5%-95%.
Can you help me solve this problem?
Thanks in advance.
Nicolas
Re: Removing outliers: Winsorization
Posted: Wed Mar 27, 2013 7:37 am
by EViews Gareth
Why use that formula instead of the one that Trubador gave. Or, why not use the
Trim add-in to do it?