Generalised-Logistic-distribution: The Generalised Logistic distribution

Generalised Logistic distributionR Documentation

The Generalised Logistic distribution

Description

Density, distribution function, quantile function and random generation for the Generalised Logistic distribution (as in Hosking and Wallis' book) with location parameter equal to loc, scale parameter equal to scale and shape parameter equal to sh

Usage

dglo(x, loc, scale, sh, log = FALSE)

pglo(q, loc, scale, sh, lower.tail = TRUE, log.p = FALSE)

qglo(p, loc, scale, sh, lower.tail = TRUE, log.p = FALSE)

rglo(n, loc, scale, sh)

Arguments

x, q

vector of quantiles

loc

location parameter

scale

scale parameter

sh

shape parameter

log, log.p

logical; if TRUE, probabilities p are given as log(p)

lower.tail

logical; if TRUE (default), probabilities are P[X \leq x] otherwise, P[X > x]

p

vector of probabilities

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Value

dglo gives the density, pglo gives the distribution function, qglo gives the quantile function, and rglo generates random deviates. The length of the result is determined by n for rglo, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments are recycled to the length of the result. Only the first elements of the logical arguments are used.

References

Hosking, J.R.M. and Wallis, J.R., 2005. Regional frequency analysis: an approach based on L-moments. Cambridge university press.

Examples

plot(seq(-26,80,by=0.2),dglo(seq(-26,80,by=0.2),4,6,-0.2),type="l")
plot(ecdf(rglo(100,4,6,-0.2)))
lines(seq(-26,80,by=0.2),pglo(seq(-26,80,by=0.2),4,6,-0.2),col=2)
qglo(c(0.5,0.99,0.995,0.995,0.999),4,6,-0.2) 
# notable quantiles

ilapros/ilaprosUtils documentation built on April 6, 2023, 4:44 a.m.