skewhypCalcRange {SkewHyperbolic}R Documentation

Range of a Skew Hyperbolic Student t-Distribution

Description

Given the parameter vector param, or parameter values of a skew hyperbolic Student t-distribution, this function determines the range outside of which the density function or distribution function are negligible, to a specified tolerance.

Usage

skewhypCalcRange(mu = 0, delta = 1, beta = 1, nu = 1,
                 param = c(mu,delta,beta,nu), density = TRUE,
                 tol= 10^(-5), ...)
skewhypStepSize(dist, delta, beta, nu, side = c("right","left"))

Arguments

mu

Location parameter \mu, default is 0.

delta

Scale parameter \delta, default is 1.

beta

Skewness parameter \beta, default is 1.

nu

Shape parameter \nu, default is 1.

param

Specifying the parameters as a vector of the form
c(mu,delta,beta,nu).

density

Logical. If TRUE bounds refer to the density function, otherwise bounds refer to the distribution function.

tol

Density function value at the endpoints of the range returned by the function.

dist

Numeric. Current distance value.

side

Character. "right" for a step to the right, "left" for a step to the right.

...

Passes additional arguments to uniroot.

Details

The particular skew hyperbolic distribution being considered is specified by either the individual parameter values, or the parameter vector param. If both are specified, the values in param will overwriete the other ones. In addition the parameter values are examined by calling the function skewhypCheckPars to see if they are valid.

The function skewhypCalcRange returns the range outside of which the density function or distribution function are less than the given tolerance. The points are found by using uniroot on the density or distribution function.

The function skewhypStepSize is used for stepping to the right or the left to obtain an enclosing interval so uniroot can be used to search. When the tail is declining exponentially the step is just a linear function of the current distance from the mode. If the tail is declining only as a power of x, an exponential step is used.

skewhypStepSize is for internal use and is not expected to be called by users. It is documented here for completeness.

Value

The function skewhypCalcRange returns a two component vector giving the lower and upper limits of the range.

skewhypStepSize returns the size of the step.

Author(s)

David Scott d.scott@auckland.ac.nz, Fiona Grimson

References

Aas, K. and Haff, I. H. (2006). The Generalised Hyperbolic Skew Student's t-distribution, Journal of Financial Econometrics, 4, 275–309.

See Also

uniroot, dskewhyp, skewhypCheckPars

Examples

param <- c(0,1,10,10)
range <- skewhypCalcRange(param = param, tol = 10^(-2))
range
curve(dskewhyp(x, param = c(0,1,5,10), range[1], range[2]))

param <- c(0,1,20,1)
(range <- skewhypCalcRange(param = param))
round(integrate(dskewhyp, -Inf, range[1], param = param)$value,7)
round(integrate(dskewhyp, range[2], Inf, param = param)$value,7)

[Package SkewHyperbolic version 0.4-2 Index]