Learn R Programming

VGAM (version 0.8-2)

Frechet: The Frechet Distribution

Description

Density, distribution function, quantile function and random generation for the three parameter Frechet distribution.

Usage

dfrechet(x, location=0, scale=1, shape, log=FALSE)
pfrechet(q, location=0, scale=1, shape)
qfrechet(p, location=0, scale=1, shape)
rfrechet(n, location=0, scale=1, shape)

Arguments

x, q
vector of quantiles.
p
vector of probabilities.
n
number of observations. Must be a positive integer of length 1.
location, scale, shape
the location parameter $a$, scale parameter $b$, and shape parameter $s$.
log
Logical. If log=TRUE then the logarithm of the density is returned.

Value

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

Details

See frechet2 and frechet3, the VGAM family functions for estimating the 2 (without location parameter) and 3 parameters by maximum likelihood estimation, for the formula of the probability density function and range restrictions on the parameters.

References

Castillo, E., Hadi, A. S., Balakrishnan, N. Sarabia, J. S. (2005) Extreme Value and Related Models with Applications in Engineering and Science, Hoboken, N.J.: Wiley-Interscience.

See Also

frechet2, frechet3.

Examples

Run this code
shape = 5
x = seq(-0.1, 3.5, len=100)
plot(x, dfrechet(x, shape=shape), type="l", ylab="", las=1,
     main="Frechet density divided into 10 equal areas; red=cdf")
abline(h=0, col="blue", lty=2)
qq = qfrechet(seq(0.1,0.9,by=0.1), shape=shape)
lines(qq, dfrechet(qq, shape=shape), col="purple", lty=3, type="h")
lines(x, pfrechet(q=x, shape=shape), col="red")

Run the code above in your browser using DataLab