Am 22.07.2020 um 04:21 schrieb Allin Cottrell:
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:
BTW, since you mention winsorisation, there is a function 'winsor' in
the extra addon (automatically shipped within gretl) to do just that.
See the help menu / "search for addons" / right-click on "extra" to
get
a link to the info (help) file, and see section 4.3 there.
It doesn't accept a list, either, so Allin's loop workaround still
applies. But you get the resulting series directly.
(Internal remark: Actually I just remembered and checked that a single
series can be provided to a list argument of a function which is then
treated as a one-element list. Maybe we can use that behavior to
generalize the winsor function to accept a list as well. The problem
would be to decide how to return more than one result series, while
keeping the standard return type of one series.)
cheers
sven