View source: R/ghypCheckPars.R
ghypCheckPars | R Documentation |
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.
ghypCheckPars(param)
param |
Numeric. Putative parameter values for a generalized hyperblic distribution. |
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.
A list with components:
case |
Either |
errMessage |
An appropriate error message if an error was found,
the empty string |
David Scott d.scott@auckland.ac.nz
Paolella, Marc S. (2007) Intermediate Probability: A Computational Approach, Chichester: Wiley
dghyp
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.