gl.check.lambda {gld} | R Documentation |
Function to check the validity of parameters of the generalized lambda distribution
Description
Checks the validity of parameters of the generalized lambda. The tests are simple for the FMKL, FM5 and GPD types, and much more complex for the RS parameterisation.
Usage
gl.check.lambda(lambdas, lambda2 = NULL, lambda3 = NULL, lambda4 = NULL, param = "fkml",
lambda5 = NULL, vect = FALSE)
Arguments
lambdas |
This can be either a single numeric value or a vector. If it is a vector, it must be of length 4 for parameterisations
If it is a a single value, it is Note that the numbering of the |
lambda2 |
|
lambda3 |
|
lambda4 |
|
lambda5 |
|
param |
choose parameterisation:
|
vect |
A logical, set this to TRUE if the parameters are given in the
vector form (it turns off checking of the format of |
Details
See GeneralisedLambdaDistribution
for details on the
generalised lambda distribution. This function determines the validity of
parameters of the distribution.
The FMKL parameterisation gives a valid
statistical distribution for any real values of \lambda_1
,
\lambda_3
,\lambda_4
and any positive real
values of \lambda_2
.
The FM5 parameterisation gives statistical distribution for any real
values of \lambda_1
, \lambda_3
,
\lambda_4
, any positive real values of
\lambda_2
and values of \lambda_5
that
satisfy -1 \leq \lambda_5 \leq 1
.
For the RS parameterisation, the combinations of parameters value that give valid distributions are the following (the region numbers in the table correspond to the labelling of the regions in Ramberg and Schmeiser (1974) and Karian, Dudewicz and McDonald (1996)):
region | \lambda_1 | \lambda_2
| \lambda_3 | \lambda_4 | note |
1 | all | <0 | < -1 | > 1 | |
2 | all | <0 | > 1 | < -1 | |
3 | all | >0 | \ge 0 | \ge 0 |
one of \lambda_3 and \lambda_4 must be non-zero |
4 | all | <0 | \le 0 | \le 0 |
one of \lambda_3 and \lambda_4 must be non-zero |
5 | all | <0 | > -1 and < 0 | >1
| equation 1 below must also be satisfied |
6 | all | <0 | >1 | > -1 and < 0
| equation 2 below must also be satisfied |
Equation 1
\frac{(1-\lambda_3) ^{1-\lambda_3}(\lambda_4-1)^{\lambda_4-1}}
{(\lambda_4-\lambda_3)^{\lambda_4-\lambda_3}} <
- \frac{\lambda_3}{\lambda_4}
Equation 2
\frac{(1-\lambda_4) ^{1-\lambda_4}(\lambda_3-1)^{\lambda_3-1}}
{(\lambda_3-\lambda_4)^{\lambda_3-\lambda_4}} <
- \frac{\lambda_4}{\lambda_3}
The GPD type gives a valid distribution provided \beta
is
positive and 0 \leq \delta \leq 1
.
Value
This logical function takes on a value of TRUE if the parameter values given produce a valid statistical distribution and FALSE if they don't
Note
The complex nature of the rules in this function for the RS parameterisation are the reason for the invention of the FMKL parameterisation and its status as the default parameterisation in the other generalized lambda functions.
Author(s)
Robert King, robert.king.newcastle@gmail.com, https://github.com/newystats/
References
Freimer, M., Mudholkar, G. S., Kollia, G. & Lin, C. T. (1988), A study of the generalized tukey lambda family, Communications in Statistics - Theory and Methods 17, 3547–3567.
Karian, Z.E., Dudewicz, E.J., and McDonald, P. (1996), The extended generalized lambda distribution system for fitting distributions to data: history, completion of theory, tables, applications, the “Final Word” on Moment fits, Communications in Statistics - Simulation and Computation 25, 611–642.
Ramberg, J. S. & Schmeiser, B. W. (1974), An approximate method for generating asymmetric random variables, Communications of the ACM 17, 78–82.
https://github.com/newystats/gld/
See Also
The generalized lambda functions GeneralisedLambdaDistribution
Examples
gl.check.lambda(c(0,1,.23,4.5),vect=TRUE) ## TRUE
gl.check.lambda(c(0,-1,.23,4.5),vect=TRUE) ## FALSE
gl.check.lambda(c(0,1,0.5,-0.5),param="rs",vect=TRUE) ## FALSE
gl.check.lambda(c(0,2,1,3.4,1.2),param="fm5",vect=TRUE) ## FALSE