The Frechet Distribution
frechetUC.RdDensity, 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,
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)Arguments
- x, q
vector of quantiles.
- p
vector of probabilities.
- n
number of observations. Passed into
runif.- location, scale, shape
the location parameter \(a\), scale parameter \(b\), and shape parameter \(s\).
- log
Logical. If
log = TRUEthen the logarithm of the density is returned.- lower.tail, log.p
Value
dfrechet gives the density,
pfrechet gives the distribution function,
qfrechet gives the quantile function, and
rfrechet generates random deviates.
References
Castillo, E., Hadi, A. S., Balakrishnan, N. and Sarabia, J. S. (2005). Extreme Value and Related Models with Applications in Engineering and Science, Hoboken, NJ, USA: Wiley-Interscience.
Details
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.
Examples
if (FALSE) shape <- 5
x <- seq(-0.1, 3.5, length = 401)
plot(x, dfrechet(x, shape = shape), type = "l", ylab = "",
main = "Frechet density divided into 10 equal areas",
sub = "Orange = CDF", las = 1)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'y' in selecting a method for function 'plot': object 'shape' not found
abline(h = 0, col = "blue", lty = 2)
#> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...): plot.new has not been called yet
qq <- qfrechet(seq(0.1, 0.9, by = 0.1), shape = shape)
#> Error: object 'shape' not found
lines(qq, dfrechet(qq, shape = shape), col = 2, lty = 2, type = "h")
#> Error: object 'qq' not found
lines(x, pfrechet(q = x, shape = shape), col = "orange")
#> Error: object 'shape' not found
# \dontrun{}