Generalized extreme value distribution
Provides density, distribution function, quantile function, and random value generation, for the generalized extreme value distribution.
dgev(x, loc, scale, shape, log = FALSE) pgev(q, loc, scale, shape, lower.tail = TRUE, log.p = FALSE) qgev(p, loc, scale, shape, lower.tail = TRUE, log.p = FALSE) rgev(n, loc, scale, shape) mgev(r, loc, scale, shape)
x, q: vector of quantiles.loc, scale, shape: location, scale and shape parameters.log, log.p: logical; if TRUE, probabilities p are given as log(p).lower.tail: logical; if TRUE (default), probabilities are otherwise, .p: vector of probabilities.n: number of observations. If length(n) > 1, the length is taken to be the number required.r: raw moment order## plot the density ggplot(data.frame(x = c(0, 20)), aes(x)) + stat_function(fun = dgev, args = list(loc = 1, scale = .5, shape = .15), colour = 'royalblue4') + labs(x = '', y = 'Density') + theme_classic()
Related functions from the same R package