ghypCalcRange: Range of a Generalized Hyperbolic Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ghypCalcRange.R

Description

Given the parameter vector Theta of a generalized hyperbolic distribution, this function determines the range outside of which the density function is negligible, to a specified tolerance. The parameterization used is the (alpha, beta) one (see dghyp). To use another parameterization, use ghypChangePars.

Usage

1
2
3
ghypCalcRange(mu = 0, delta = 1, alpha = 1, beta = 0, lambda = 1,
              param = c(mu, delta, alpha, beta, lambda),
              tol = 10^(-5), density = TRUE, ...)

Arguments

mu

mu is the location parameter. By default this is set to 0.

delta

delta is the scale parameter of the distribution. A default value of 1 has been set.

alpha

alpha is the tail parameter, with a default value of 1.

beta

beta is the skewness parameter, by default this is 0.

lambda

lambda is the shape parameter and dictates the shape that the distribution shall take. Default value is 1.

param

Value of parameter vector specifying the generalized hyperbolic distribution. This takes the form c(mu, delta, alpha, beta, lambda).

tol

Tolerance.

density

Logical. If TRUE, the bounds are for the density function. If FALSE, they should be for the probability distribution, but this has not yet been implemented.

...

Extra arguments for calls to uniroot.

Details

The particular generalized hyperbolic distribution being considered is specified by the value of the parameter value param.

If density = TRUE, the function gives a range, outside of which the density is less than the given tolerance. Useful for plotting the density. Also used in determining break points for the separate sections over which numerical integration is used to determine the distribution function. The points are found by using uniroot on the density function.

If density = FALSE, the function returns the message: "Distribution function bounds not yet implemented".

Value

A two-component vector giving the lower and upper ends of the range.

Author(s)

David Scott d.scott@auckland.ac.nz

References

Barndorff-Nielsen, O. and Bl<c3><a6>sild, P (1983). Hyperbolic distributions. In Encyclopedia of Statistical Sciences, eds., Johnson, N. L., Kotz, S. and Read, C. B., Vol. 3, pp. 700–707. New York: Wiley.

See Also

dghyp, ghypChangePars

Examples

1
2
3
4
5
6
param <- c(0, 1, 5, 3, 1)
maxDens <- dghyp(ghypMode(param = param), param = param)
ghypRange <- ghypCalcRange(param = param, tol = 10^(-3) * maxDens)
ghypRange
curve(dghyp(x, param = param), ghypRange[1], ghypRange[2])
## Not run: ghypCalcRange(param = param, tol = 10^(-3), density = FALSE)

sjp/GeneralizedHyperbolic documentation built on May 30, 2019, 12:06 a.m.