Description Usage Arguments Details Author(s) References Examples
Given a set of parameters for the Generalised Normal Laplace distribution, the functions checks the validity of each parameter and if they and if they correspond to the boundary cases.
1 | gnlCheckPars(param)
|
param |
Numeric. Parameter values for the Generalised Normal Laplace distribution. |
The vector param
takes the form c(mu, sigma, alpha, beta, rho)
.
If any of sigma
, alpha
, beta
or rho
is negative or NA, an
error is returned.
Simon Potter
William J. Reed. (2006) The Normal-Laplace Distribution and Its Relatives. In Advances in Distribution Theory, Order Statistics and Inference, pp. 61–74. Birkhäuser, Boston.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Correct parameters
gnlCheckPars(c(0, 1.5, 1, 2, 1))
gnlCheckPars(c(3, 1, 1.5, 2, 2))
## Incorrect parameters, each error providing a different error message
gnlCheckPars(c(2, -1, 1, 1, 1)) # invalid sigma
gnlCheckPars(c(2, 1, -1, 2, 1)) # invalid alpha
gnlCheckPars(c(0, 1, 2, -1, 1)) # invalid beta
gnlCheckPars(c(0, 1, 2, 1, -1)) # invalid rho
gnlCheckPars(c(0, -0.01, -0.1, 1, 1)) # sigma and alpha incorrect
gnlCheckPars(c(2, -0.5, 1, -0.2, 1)) # sigma and beta incorrect
gnlCheckPars(c(2, -0.5, 1, 0.2, -1)) # sigma and rho incorrect
gnlCheckPars(c(1, 1, -0.2, -1, 1)) # alpha and beta incorrect
gnlCheckPars(c(1, 1, -0.2, 1, -1)) # alpha and rho incorrect
gnlCheckPars(c(1, 1, 0.2, -1, -1)) # beta and rho incorrect
gnlCheckPars(c(1, -1, -0.2, -1, 1)) # sigma, alpha and beta incorrect
gnlCheckPars(c(1, -1, -0.2, 1, -1)) # sigma, alpha and rho incorrect
gnlCheckPars(c(1, -1, 0.2, -1, -1)) # sigma, beta and rho incorrect
gnlCheckPars(c(1, 1, -0.2, -1, -1)) # alpha, beta and rho incorrect
gnlCheckPars(c(0, -0.1, -0.2, -0.3, -0.4)) # all four parameters erroneous
gnlCheckPars(c(0.5, NA, 1, 1, 1)) # NA introduced
gnlCheckPars(c(-1, 1, 1)) # incorrect number of parameters
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.