gigCheckPars | R Documentation |
Given a putative set of parameters for the generalized inverse Gaussian distribution, the functions checks if they are in the correct range, and if they correspond to the boundary cases.
gigCheckPars(param, ...)
param |
Numeric. Putative parameter values for a generalized inverse Gaussian distribution. |
... |
Further arguments for calls to |
The vector param
takes the form c(chi, psi, lambda)
.
If either chi
or psi
is negative, an error is returned.
If chi
is 0 (to within tolerance allowed by all.equal
)
then psi
and lambda
must be positive or an error is
returned. If these conditions are satisfied, the distribution is
identified as a gamma distribution.
If psi
is 0 (to within tolerance allowed by all.equal
)
then chi
must be positive and lambda
must be negative or
an error is returned. If these conditions are satisfied, the
distribution is identified as an inverse gamma distribution.
If both chi
and psi
are positive, then the distribution
is identified as a normal generalized inverse Gaussian distribution.
A list with components:
case |
Whichever of |
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
dgig
gigCheckPars(c(5, 2.5, -0.5)) # normal
gigCheckPars(c(-5, 2.5, 0.5)) # error
gigCheckPars(c(5, -2.5, 0.5)) # error
gigCheckPars(c(-5, -2.5, 0.5)) # error
gigCheckPars(c(0, 2.5, 0.5)) # gamma
gigCheckPars(c(0, 2.5, -0.5)) # error
gigCheckPars(c(0, 0, 0.5)) # error
gigCheckPars(c(0, 0, -0.5)) # error
gigCheckPars(c(5, 0, 0.5)) # error
gigCheckPars(c(5, 0, -0.5)) # invgamma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.