Density, distribution function, quantile function and random generation for the three parameter Frechet distribution.
dfrechet(x, location = 0, scale = 1, shape, log = FALSE)
pfrechet(q, location = 0, scale = 1, shape,
lower.tail = TRUE, log.p = FALSE)
qfrechet(p, location = 0, scale = 1, shape,
lower.tail = TRUE, log.p = FALSE)
rfrechet(n, location = 0, scale = 1, shape)
vector of quantiles.
vector of probabilities.
number of observations.
Passed into runif
.
the location parameter
Logical.
If log = TRUE
then the logarithm of the density is returned.
dfrechet
gives the density,
pfrechet
gives the distribution function,
qfrechet
gives the quantile function, and
rfrechet
generates random deviates.
See frechet
, the VGAM
family function for estimating the 2 parameters (without location
parameter) by maximum likelihood estimation, for the formula
of the probability density function and range restrictions on
the parameters.
Castillo, E., Hadi, A. S., Balakrishnan, N. Sarabia, J. S. (2005). Extreme Value and Related Models with Applications in Engineering and Science, Hoboken, NJ, USA: Wiley-Interscience.
# NOT RUN {
shape <- 5
x <- seq(-0.1, 3.5, length = 401)
plot(x, dfrechet(x, shape = shape), type = "l", ylab = "", las = 1,
main = "Frechet density divided into 10 equal areas; orange = 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 = "orange")
# }
Run the code above in your browser using DataLab