Hi again,
Thanks for all the replies so far. Allin's solution comes up with five quantiles, one for each series, but what I would like to do is to have just one quantile scalar for the whole five series. Each of the five series has 20 observations. Thus, in total I have 100 observations. I want to trim or winsorise at the 90 quantile for example, so to exclude the top 5% and the bottom 5% observations, no matter whether they come all from series 1, or one from each of the five series.
What I need is to treat all the series as if just one, to then determine the quantile value.
F.R.Costa
--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com
Jul 22, 2020, 03:21 by cottrell@wfu.edu:
On Tue, 21 Jul 2020, F.R.Costa wrote:
Hi all,
I'm trying to determine the quantile value (as a scalar) for a list of series and I really don't know how to do it. Let's say I want p=0.7 on the following example:
<hansl>
open greene13_1.gdt
list list_mv = F_GM F_CH F_GE F_WE F_US
</hansl>
Basically I have a list of 5 series with market values and I want to determine extreme values in order to proceed with winsorisation. But the quantile function seems not tailored for this.
The quantile() function takes either a series or a matrix argument, so your options are:
(1) Loop across the series members of the list:
loop foreach i list_mv
eval quantile($i, 0.7)
endloop
(2) Turn the list into a matrix on the fly, one series by column (and get a row vector result):
eval quantile({list_mv}, 0.7)
Allin
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/