expected.gld: expected value of the Generalized Lambda Distribution

expected.gldR Documentation

expected value of the Generalized Lambda Distribution

Description

Returns the expected value of the Generalized Lambda Distribution

Usage

expected.gld(n=1, i=1, params)
expected.gld.approx(n=1, i=1, params)

Arguments

n

Number of observations

i

Order statistic: i=1 means the smallest of n, and n=i means the largest

params

The four parameters of a GLD distribution

Details

expected.gld and expected.approx return the exact and approximate values of the expected value of a Generalized Lambda Distribution RV.

Exploits the fact that the gld quantile function is the sum of a constant and two davies quantile functions

Author(s)

Robin K. S. Hankin

References

A. Ozturk and R. F. Dale, “Least squares estimation of the parameters of the generalized lambda distribution”, Technometrics 1985, 27(1):84 [it does not appear to be possible, as of R-2.9.1, to render the diacritic marks in the first author's names in a nicely portable way]

See Also

Gld , expected.value

Examples

params <- c(4.114,0.1333,0.0193,0.1588)
mean(rgld(1000,params))
expected.gld(n=1,i=1,params)
expected.gld.approx(n=1,i=1,params)


f <- function(n){apply(matrix(rgld(n+n,params),2,n),2,min)}
#ie f(n) gives the smaller of 2 rgld RVs, n times.

mean(f(1000))
expected.gld(n=2,i=1,params)
expected.gld.approx(n=2,i=1,params)

plot(1:100,expected.gld.approx(n=100,i=1:100,params)-expected.gld(n=100,i=1:100,params))
# not bad, eh? ....yyyeeeeesss, but the parameters given by Ozturk give
# an almost zero second derivative for d(qgld)/dp, so the good agreement
# isn't surprising really.  Observe that the error is minimized at about
# p=0.2, where the point of inflection is.

Davies documentation built on March 18, 2022, 5:52 p.m.