View source: R/ghypCalcRange.R
ghypCalcRange | R Documentation |
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
.
ghypCalcRange(Theta, tol = 10^(-5), density = TRUE, ...)
Theta |
Value of parameter vector specifying the hyperbolic distribution. |
tol |
Tolerance. |
density |
Logical. If |
... |
Extra arguments for calls to |
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
".
A two-component vector giving the lower and upper ends of the range.
David Scott d.scott@auckland.ac.nz
Barndorff-Nielsen, O. and Blæ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.
dghyp
, ghypChangePars
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.