GEV {CoSMoS} | R Documentation |
Generalized extreme value distribution
Description
Provides density, distribution function, quantile function, and random value generation, for the generalized extreme value distribution.
Usage
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)
Arguments
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 |
p |
vector of probabilities. |
n |
number of observations. If |
r |
raw moment order |
Examples
## 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()
[Package CoSMoS version 2.1.0 Index]