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!
Removing outliers: Winsorization
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Re: Removing outliers: Winsorization
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":
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...
Code: Select all
series y_q = @recode(y>@quantile(y,.995),@quantile(y,.995),@recode(y<@quantile(y,.005),@quantile(y,.005),y))Re: Removing outliers: Winsorization
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Removing outliers: Winsorization
Why use that formula instead of the one that Trubador gave. Or, why not use the Trim add-in to do it?
Who is online
Users browsing this forum: No registered users and 1 guest
