Frechet {mistr}R Documentation

The Frechet Distribution

Description

Density, distribution function, quantile function and random generation for the Frechet distribution with location, scale and shape parameters.

Usage

dfrechet(x, loc = 0, scale = 1, shape = 1, log = FALSE)

pfrechet(q, loc = 0, scale = 1, shape = 1, lower.tail = TRUE, log.p = FALSE)

qfrechet(p, loc = 0, scale = 1, shape = 1, lower.tail = TRUE, log.p = FALSE)

rfrechet(n, loc = 0, scale = 1, shape = 1)

Arguments

x, q

vector of quantiles.

loc

location parameter.

scale

scale parameter.

shape

shape parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p), default: FALSE.

lower.tail

logical; if TRUE, probabilities are P[X \le x] otherwise, P[X > x], default: TRUE.

p

vector of probabilities.

n

number of observations.

Details

The Frechet distribution function with location parameter m, scale parameter s and shape parameter \alpha has density given by

f(x)=\alpha/s z^(-\alpha-1) e^-z^-\alpha

for x>m, where z=(x-m)/s. The cumulative distribution function is

F(x)=e^-z^-\alpha

for x>m, with z as stated above.

See https://en.wikipedia.org/wiki/Frechet_distribution for more details.

Value

dfrechet gives the density, pfrechet gives the distribution function, qfrechet gives the quantile function, and rfrechet generates random deviates.

Invalid arguments will result in return value NaN, with a warning.

See Also

frechetdist

Examples

dfrechet(seq(1, 5), 0, 1, 1)
qfrechet(pfrechet(seq(1, 5), 0, 1, 1), 0, 1, 1)
rfrechet(5, 0, 1, 1)

[Package mistr version 0.0.6 Index]