# glCheckPars: Function to check the validity of parameters of the... In GeneralizedLambda: The Generalized Lambda Distribution

## Description

Checks the validity of parameters of the generalized lambda. The tests are simple for the FMKL, VSK and FM5 parameterisations, and much more complex for the RS parameterisation.

## Usage

 ```1 2 3 4 5 6``` ```glCheckPars(param, version = "FMKL", lambda5 = NULL) glCheckParsFMKL(param) glCheckParsRS(param) glCheckParsVSK(param) glCheckParsAS(param) glCheckParsFMKL5(param, lambda5) ```

## Arguments

 `param` Vector of length 4. Each element of the vector defines lambda1 to lambda4, where lambdas from 1 to 4 define the location, scale and first and second shape parameters of the distribution. Note that the numbering of the lambda parameters for the fmkl parameterisation is different to that used by Freimer, Mudholkar, Kollia and Lin. `lambda5` a skewness parameter, in the fm5 parameterisation. `version` choose parameterisation: `FMKL` uses Freimer, Mudholkar, Kollia and Lin (1988) (default). `RS` uses Ramberg and Schmeiser (1974) `FM5` uses the 5 parameter version of the FMKL parameterisation

## Details

See `GeneralizedLambda` 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 a 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 <= lambda5 <= 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 ≥ 0 ≥ 0 one of lambda 3 and lambda 4 must be non-zero 4 all <0 ≤ 0 ≤ 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

( (1-lambda3) ^ ( 1 - lambda3) * (lambda4 -1) ^ (lambda4 -1) ) / ( (lambda4 - lambda3) ^ (lambda4 - lambda3) ) < - lambda3 / lambda 4

Equation 2

( (1-lambda4)^( 1 - lambda4)*(lambda3 -1)^(lambda3 -1) ) / ( (lambda3 - lambda4) ^ (lambda3 - lambda4) ) < - lambda4 / lambda 3

## Value

`glCheckPars` returns `TRUE` if the parameter values given produce a valid statistical distribution and "error" if they don't according to its specified parameterisation. The default parameterisation is FMKL and without specifying parameterisation, the following functions can be used:

`glCheckParsFMKL` is used for FMKL parameterisation `glCheckParsRS` is used for RS parameterisation `glCheckParsVSK` is used for VSK parameterisation `glCheckParsAS` is used for AS parameterisation `glCheckParsFMKL5` is used for F5 parameterisation

## 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)

Jeong Min Kim, [email protected]

David Scott, [email protected]

## 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.

Gilchrist, Warren G. (2000) Modelling with Quantile Functions, Chapman \& Hall/CRC, London.

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.

The generalized lambda functions `GeneralizedLambdaDistribution`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```glCheckPars(param = c(0,1,.23,4.5)) ## TRUE ## Not run: glCheckPars(c(0,-1,.23,4.5)) ## error glCheckPars(c(0,1,0.5,-0.5), param = "RS") ## error glCheckPars(c(0,2,1,3.4,1.2), param = "fm5") ## error ## End(Not run) glCheckParsFMKL(param = c(1,2,0.5,-2)) ## TRUE ## Not run: glCheckParsRS(param = c(-1,0.23,0.5,-2)) ## error glCheckParsVSK(param = c(0.1,-2,0,-2)) ## error glCheckParsAS(param = c(1,2,0,0)) ## Not yet implemented glCheckParsFMKL5(param = c(1,2,0.5,-2)) ## Not yet implemented ## End(Not run) ```