Generic Functions for the Computation of Functionals

Description

Generic functions for the computation of functionals on distributions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
IQR(x, ...)

## S4 method for signature 'Gumbel'
IQR(x)
## S4 method for signature 'GEV'
IQR(x)
## S4 method for signature 'GPareto'
IQR(x)
## S4 method for signature 'Pareto'
IQR(x)

median(x, ...)

## S4 method for signature 'Gumbel'
median(x)
## S4 method for signature 'GEV'
median(x)
## S4 method for signature 'GPareto'
median(x)
## S4 method for signature 'Pareto'
median(x)

var(x, ...)

## S4 method for signature 'Gumbel'
var(x, ...)
## S4 method for signature 'GEV'
var(x, ...)
## S4 method for signature 'GPareto'
var(x, ...)
## S4 method for signature 'Pareto'
var(x, ...)

skewness(x, ...)
## S4 method for signature 'Gumbel'
skewness(x, ...)
## S4 method for signature 'GEV'
skewness(x, ...)
## S4 method for signature 'GPareto'
skewness(x, ...)
## S4 method for signature 'Pareto'
skewness(x, ...)

kurtosis(x, ...)
## S4 method for signature 'Gumbel'
kurtosis(x, ...)
## S4 method for signature 'GEV'
kurtosis(x, ...)
## S4 method for signature 'GPareto'
kurtosis(x, ...)
## S4 method for signature 'Pareto'
kurtosis(x, ...)

Sn(x, ...)
## S4 method for signature 'ANY'
Sn(x,  ...)
## S4 method for signature 'UnivariateDistribution'
Sn(x, low = 0, upp = 1.01, accuracy = 1000, ...)
## S4 method for signature 'DiscreteDistribution'
Sn(x,  ...)
## S4 method for signature 'AffLinDistribution'
Sn(x,  ...)
## S4 method for signature 'Norm'
Sn(x,  ...)
## S4 method for signature 'GPareto'
Sn(x,  ...)
## S4 method for signature 'GEV'
Sn(x,  ...)
## S4 method for signature 'Gammad'
Sn(x,  ...)
## S4 method for signature 'Weibull'
Sn(x,  ...)

Qn(x, ...)
## S4 method for signature 'ANY'
Qn(x,  ...)
## S4 method for signature 'UnivariateDistribution'
Qn(x, q00 = NULL, ...)
## S4 method for signature 'AffLinDistribution'
Qn(x, ...)
## S4 method for signature 'DiscreteDistribution'
Qn(x,  ...)
## S4 method for signature 'Norm'
Qn(x,  ...)

Arguments

x

object of class "UnivariateDistribution"

...

additional arguments to fun or E

q00

numeric or NULL: determines search interval (from -q00 to q00) for Qn; if NULL (default) q00 is set to 10*q(x)(3/4) internally.

low

numeric; lower bound for search interval for median(abs(x-Y)) where Y (a real constant) runs over the range of x; defaults to 0.

upp

numeric; upper bound for search interval for median(abs(x-Y)) where Y (a real constant) runs over the range of x; defaults to 1.01. Is used internally as upp*(mad(x)+abs(median(x)-Y)).

accuracy

numeric; number of grid points for Sn; defaults to 1000.

Value

The value of the corresponding functional at the distribution in the argument is computed.

Methods

Qn, signature(x = "Any"):

interface to the robustbase-function Qn — see Qn.

Qn, signature(x = "UnivariateDistribution"):

Qn of univariate distributions.

Qn, signature(x = "DiscreteDistribution"):

Qn of discrete distributions.

Qn, signature(x = "AffLinDistribution"):

abs(x@a) * Qn(x@X0)

Sn, signature(x = "Any"):

interface to the robustbase-function Qn — see Sn.

Sn, signature(x = "UnivariateDistribution"):

Sn of univariate distributions using pseudo-random variables (Thx to N. Horbenko).

Sn, signature(x = "DiscreteDistribution"):

Sn of discrete distributions.

Sn, signature(x = "AffLinDistribution"):

abs(x@a) * Sn(x@X0)

var, signature(x = "Gumbel"):

exact evaluation using explicit expressions.

var, signature(x = "GPareto"):

exact evaluation using explicit expressions.

var, signature(x = "GEV"):

exact evaluation using explicit expressions.

var, signature(x = "Pareto"):

exact evaluation using explicit expressions.

IQR, signature(x = "Gumbel"):

exact evaluation using explicit expressions.

IQR, signature(x = "GPareto"):

exact evaluation using explicit expressions.

IQR, signature(x = "GEV"):

exact evaluation using explicit expressions.

IQR, signature(x = "Pareto"):

exact evaluation using explicit expressions.

median, signature(x = "Gumbel"):

exact evaluation using explicit expressions.

median, signature(x = "GEV"):

exact evaluation using explicit expressions.

median, signature(x = "GPareto"):

exact evaluation using explicit expressions.

median, signature(x = "Pareto"):

exact evaluation using explicit expressions.

skewness, signature(x = "Gumbel"):

exact evaluation using explicit expressions.

skewness, signature(x = "GEV"):

exact evaluation using explicit expressions.

skewness, signature(x = "GPareto"):

exact evaluation using explicit expressions.

skewness, signature(x = "Pareto"):

exact evaluation using explicit expressions.

kurtosis, signature(x = "Gumbel"):

exact evaluation using explicit expressions.

kurtosis, signature(x = "GEV"):

exact evaluation using explicit expressions.

kurtosis, signature(x = "GPareto"):

exact evaluation using explicit expressions.

kurtosis, signature(x = "Pareto"):

exact evaluation using explicit expressions.

Sn, signature(x = "Norm"):

exact evaluation using explicit expressions.

Sn, signature(x = "GPareto"):

speeded up using interpolation grid.

Sn, signature(x = "GEV"):

speeded up using interpolation grid.

Sn, signature(x = "Gammad"):

speeded up using interpolation grid.

Sn, signature(x = "Weibull"):

speeded up using interpolation grid.

Qn, signature(x = "Norm"):

exact evaluation using explicit expressions.

Caveat

If any of the packages e1071, moments, fBasics is to be used together with distrEx (or RobExtremes) the latter must be attached after any of the first mentioned. Otherwise kurtosis() and skewness() defined as methods in distrEx (or RobExtremes) may get masked.
To re-mask, you may use kurtosis <- distrEx::kurtosis; skewness <- distrEx::skewness. See also distrExMASK().

Author(s)

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de

See Also

Var,
sd, var, IQR,
median, mad, sd,
Sn, Qn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Variance of Exp(1) distribution
G <- GPareto()
var(G)

#median(Exp())
IQR(G)

## note the timing
Sn(GPareto(shape=0.5,scale=2))
Sn(as(GPareto(shape=0.5,scale=2),"AbscontDistribution"))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.