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
ghypCalcRange(Theta, tol = 10^(-5), density = TRUE, ...)
Arguments
Theta
Value of parameter vector specifying the hyperbolic
distribution.
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 Theta.
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.
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
Theta <- c(1,5,3,1,0)
maxDens <- dghyp(ghypMode(Theta), Theta)
ghypRange <- ghypCalcRange(Theta, tol = 10^(-3)*maxDens)
ghypRange
curve(dghyp(x, Theta), ghypRange[1], ghypRange[2])
## Not run: ghypCalcRange(Theta, tol = 10^(-3), density = FALSE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(HyperbolicDist)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HyperbolicDist/ghypCalcRange.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ghypCalcRange
> ### Title: Range of a Generalized Hyperbolic Distribution
> ### Aliases: ghypCalcRange
> ### Keywords: distribution
>
> ### ** Examples
>
> Theta <- c(1,5,3,1,0)
> maxDens <- dghyp(ghypMode(Theta), Theta)
> ghypRange <- ghypCalcRange(Theta, tol = 10^(-3)*maxDens)
> ghypRange
[1] -1.126003 5.216412
> curve(dghyp(x, Theta), ghypRange[1], ghypRange[2])
> ## Not run: ghypCalcRange(Theta, tol = 10^(-3), density = FALSE)
>
>
>
>
>
> dev.off()
null device
1
>