Page 1 of 1
Winsorizing
Posted: Wed May 07, 2014 1:11 am
by mahershams
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
Re: Winsorizing
Posted: Wed May 07, 2014 2:02 am
by trubador
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.
Re: Winsorizing
Posted: Wed May 07, 2014 5:00 am
by mahershams
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
Re: Winsorizing
Posted: Wed May 07, 2014 5:03 am
by mahershams
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.
Re: Winsorizing
Posted: Wed May 07, 2014 5:04 am
by mahershams
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?
Re: Winsorizing
Posted: Wed May 07, 2014 5:38 am
by trubador
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.
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 = ..."
Re: Winsorizing
Posted: Wed May 07, 2014 8:32 pm
by mahershams
Thank you very much for help.
Re: Winsorizing
Posted: Wed May 09, 2018 4:11 pm
by saraali
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
Re: Winsorizing
Posted: Wed May 09, 2018 10:56 pm
by Sabs
Are you sure you are winsorizing and not not trimming?
Re: Winsorizing
Posted: Thu May 10, 2018 2:02 pm
by saraali
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