ghypCheckPars {GeneralizedHyperbolic} | R Documentation |
Check Parameters of the Generalized Hyperbolic Distribution
Description
Given a putative set of parameters for the generalized hyperbolic distribution, the functions checks if they are in the correct range, and if they correspond to the boundary cases.
Usage
ghypCheckPars(param)
Arguments
param |
Numeric. Putative parameter values for a generalized hyperblic distribution. |
Details
The vector param
takes the form c(mu, delta, alpha, beta,
lambda)
.
If alpha
is negative, an error is returned.
If lambda is 0 then the absolute value of beta
must be less
than alpha
and delta must be greater than zero. If either of
these conditions are false, than a error is returned.
If lambda
is greater than 0 the absolute value of beta
must be less than alpha
. delta
must also be
non-negative. When either one of these is not true, an error is
returned.
If lambda
is less than 0 then the absolute value of beta
must be equal to alpha
. delta
must be greater than 0, if
both conditions are not true, an error is returned.
Value
A list with components:
case |
Either |
errMessage |
An appropriate error message if an error was found,
the empty string |
Author(s)
David Scott d.scott@auckland.ac.nz
References
Paolella, Marc S. (2007) Intermediate Probability: A Computational Approach, Chichester: Wiley
See Also
Examples
ghypCheckPars(c(0, 2.5, -0.5, 1, 0)) # error
ghypCheckPars(c(0, 2.5, 0.5, 0, 0)) # normal
ghypCheckPars(c(0, 1, 1, -1, 0)) # error
ghypCheckPars(c(2, 0, 1, 0.5, 0)) # error
ghypCheckPars(c(0, 5, 2, 1.5, 0)) # normal
ghypCheckPars(c(0, -2.5, -0.5, 1, 1)) # error
ghypCheckPars(c(0, -1, 0.5, 1, 1)) # error
ghypCheckPars(c(0, 0, -0.5, -1, 1)) # error
ghypCheckPars(c(2, 0, 0.5, 0, -1)) # error
ghypCheckPars(c(2, 0, 1, 0.5, 1)) # skew laplace
ghypCheckPars(c(0, 1, 1, 1, -1)) # skew hyperbolic