GPDInt: Arc length of GPD PDF.

Description Usage Arguments Details Value Examples

Description

Calculate the arc length for a univariate generalised Pareto probability density function over a specified interval.

Usage

1
2
3
GPDInt(mu, sigma, alpha, q1, q2, quantile)

GPDInt2(mu, sigma, alpha, q1, q2, quantile)

Arguments

mu

A real number specifying the location parameter.

sigma

A strictly positive real number specifying the scale parameter.

alpha

A real number specifying the shape parameter.

q1

The point (or vector for GPDInt2) specifying the lower limit of the arc length integral.

q2

The point (or vector for GPDInt2) specifying the upper limit of the arc length integral.

quantile

Logical, TRUE/FALSE, whether q1 and q2 are quantiles, or actual points in the domain.

Details

The arc length of a univariate generalised Pareto probability density function is approximated using the numerical integration C code implimented for R's integrate functions, i.e. using Rdqags. For this approximation, subdiv = 100 (100 subdivisions), and eps_abs = eps_rel = 1e-10, i.e. the absolute and relative errors respectively.

Value

GPDInt: A list with the following components:

GPDInt2: A vector having length equal to that of the vector of lower quantile bounds, containing the arc lengths requested for a generalised Pareto probability density function.

Examples

1
2
3
4
5
6
7
8
9
library(alR)
mu <- 0
sigma <- 1
alpha <- 2
GPDInt(mu, sigma, alpha, 0.025, 0.975, TRUE)
GPDInt(mu, sigma, alpha, 0.001, 0.5, FALSE)

GPDInt2(mu, sigma, alpha, c(0.025, 0.5), c(0.5, 0.975), TRUE)
GPDInt2(mu, sigma, alpha, c(-1.96, 0), c(0, 1.96), FALSE)

mtloots/alR documentation built on May 23, 2019, 8:18 a.m.