GPA: Generalized Pareto distribution (GPA)

Description Usage Arguments Details Examples

Description

Distribution, density, quantile and random function for the Generalized pareto distriution.

Usage

1
2
3
4
5
6
7
pgpa(q, alpha = 1, kap = 0, lower.tail = TRUE)

rgpa(n, alpha = 1, kap = 0)

dgpa(x, alpha = 1, kap = 0, log = FALSE)

qgpa(p, alpha = 1, kap = 0, lower.tail = TRUE)

Arguments

alpha

Scale parameter of the GPA

kap

Shape parameter of the GPA

lower.tail

Should the propability of the lower tail be returned

n

Number of simulations.

log

Should the log-density be returned

p, q

Probabilities or quantiles for the GPA distribution.

Details

These function are reorganisation of some functions in R-package evd using the parametrisation (α, κ) that is coherent with the notation frequently used in hydrology.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
kap <- -.2
a <- 1
xd1 <- rgpa(1e4, a, kap)
xd2 <- qgpa(runif(1e4), a, kap)

qqplot(xd1, xd2)


tt <- seq(0.001,6, len = 100)

hist(xd1[xd1<6], main = 'GPA distribution',
  freq = FALSE, ylim =c(0,1), xlim = c(0,6))

lines(tt, dgpa(tt,a,kap))
lines(tt,pgpa(sort(tt), a, kap), col = 2, lty = 2)

martindurocher/floodStat documentation built on May 31, 2019, 12:42 a.m.