Winsorizing

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

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

mahershams
Posts: 10
Joined: Sat Dec 22, 2012 3:57 am

Winsorizing

Postby mahershams » Wed May 07, 2014 1:11 am

Dear all

I would like to winsorizing at 1 percent level. My variable name is ln_total_dividends. Should I replace the Y in the below equation using. Even if i replace the y with ln_total_dividends, it shows syntax error. I use generate series by equation tab to estimate the series.

series y_q = @recode(y>@quantile(y,.995),@quantile(y,.995),@recode(y<@quantile(y,.005),@quantile(y,.005),y))

Please advice me how to solve this problem.

Thanks
Shams

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Winsorizing

Postby trubador » Wed May 07, 2014 2:02 am

Your question is not clear. If variable "y" does have observations, then the formula that generates series y_q should work. As far as I understand, "y" and "ln_total_dividends" are identical. So it is hard to identify the source of the problem without seeing the workfile and the steps you followed. Other than that, EViews has a nice Trimming add-in that does what you want.

mahershams
Posts: 10
Joined: Sat Dec 22, 2012 3:57 am

Re: Winsorizing

Postby mahershams » Wed May 07, 2014 5:00 am

Hi

Thank you very much for reply. I download your link. It shows me that it successfully installed but under add in it did not appear and i could not find any dialogue box to use it.

Can you please advice where i will find this option/diologue box after installtion.

Regards
Shams

mahershams
Posts: 10
Joined: Sat Dec 22, 2012 3:57 am

Re: Winsorizing

Postby mahershams » Wed May 07, 2014 5:03 am

You are correct. I want to winsorising ln_total_dividends variable, in that case i have modified the equation and replace y with ln_total_dividends. But it provides syntax error.

mahershams
Posts: 10
Joined: Sat Dec 22, 2012 3:57 am

Re: Winsorizing

Postby mahershams » Wed May 07, 2014 5:04 am

so i select quick bar and then select generate series by equation. then i paste the equation and modified the equation with my variable name. is this correct way?

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Winsorizing

Postby trubador » Wed May 07, 2014 5:38 am

mahershams wrote:Can you please advice where i will find this option/diologue box after installtion.

Open the series. You should see "Trimming and Winsorising" under the Proc/Add-ins.
mahershams wrote:so i select quick bar and then select generate series by equation. then i paste the equation and modified the equation with my variable name. is this correct way?

When you use that option, you should write "y_q = ....", instead of "series y_q = ..."

mahershams
Posts: 10
Joined: Sat Dec 22, 2012 3:57 am

Re: Winsorizing

Postby mahershams » Wed May 07, 2014 8:32 pm

Thank you very much for help.

saraali
Posts: 3
Joined: Tue May 08, 2018 3:21 pm

Re: Winsorizing

Postby saraali » Wed May 09, 2018 4:11 pm

Hi there,

I am applying the Trimming and winsorising add-ins on my data for 1% and 99% but the resulted series of my funds losing the number of observations.

I am not sure, why the observations disappearing from the columns as winsorize help you adjust the extreme values to the nearest lowest and highest value rather than omitting them. Please, can you advise why this is happening in my workfile.

I have 1373 funds returns data over time and each fund has a different number of returns observation.

Thanks,
Sara

Sabs
Posts: 2
Joined: Sun May 06, 2018 9:45 pm

Re: Winsorizing

Postby Sabs » Wed May 09, 2018 10:56 pm

Are you sure you are winsorizing and not not trimming?

saraali
Posts: 3
Joined: Tue May 08, 2018 3:21 pm

Re: Winsorizing

Postby saraali » Thu May 10, 2018 2:02 pm

Hello Sabs,

Yes, I select Winsorizing from the drop-down menu not Trimming and repeat it few times but I am not sure why this is happening? I tried on an individual column as well for example the below data belongs to a fund and when I apply 1% lower and 99% upper it removes all the values and resulted column is empty.
I tried this formula as well
series y_q = @recode(y>@quantile(y,.99),@quantile(y,.99),@recode(y<@quantile(y,.01),@quantile(y,.01),y)) but for below data, i am getting blank column.


-2.91
4.55
9.98
-5.06
-1.92
-7.95
6.39
3.55
18.47
-4.91
-0.99
4.89
0.48
1.60
-2.87
0.82
2.49
5.13
7.61
-1.70
2.69
-3.33
2.91
16.20
21.97
2.80
8.46
-2.39
18.62
6.66
2.63
4.99
-39.55
7.63
-33.93
41.64
-15.94
-31.48
-3.15
-35.70
-45.06
-53.87
-2.81
43.04

Regards,
Sara


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 6 guests