ghypCheckPars: Check Parameters of the Generalized Hyperbolic Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ghypCheckPars.R

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

1

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 the name of the special case of the distribution or "error".

errMessage

An appropriate error message if an error was found, the empty string "" otherwise.

Author(s)

David Scott d.scott@auckland.ac.nz

References

Paolella, Marc S. (2007) Intermediate Probability: A Computational Approach, Chichester: Wiley

See Also

dghyp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

sjp/GeneralizedHyperbolic documentation built on May 30, 2019, 12:06 a.m.