plotgl {gld}R Documentation

Plots of density and distribution function for the generalised lambda distribution

Description

Produces plots of density and distribution function for the generalised lambda distribution. Although you could use plot(function(x)dgl(x)) to do this, the fact that the density and quantiles of the generalised lambda are defined in terms of the depth, u, means that a seperate function that uses the depths to produce the values to plot is more efficient

Usage

plotgld(lambda1 = 0, lambda2 = 1, lambda3, lambda4, param = "fmkl", 
new.plot = TRUE, truncate = 0, bnw = FALSE, col.or.type = 1, 
granularity = 4000, xlab = NULL, ylab = NULL, quant.probs = seq(0,1,.25), ...)
plotglc(lambda1 = 0, lambda2 = 1, lambda3, lambda4, param = "fmkl", 
granularity = 4000, xlab = "x", ylab = "cumulative probability", ...)

Arguments

lambda1 lambda 1 - location parameter Note that the numbering of the lambda parameters is different to that used by Freimer, Mudholkar, Kollia and Lin.
lambda2 lambda 2 - scale parameter
lambda3 lambda 3 - first shape parameter
lambda4 lambda 4 - second shape parameter
param choose parameterisation: fmkl uses Freimer, Mudholkar, Kollia and Lin (1988) (default). rs uses Ramberg and Schmeiser (1974)
new.plot a logical value describing whether this should produce a new plot (using plot), or add to an existing plot (using lines)
truncate for plotgld, a minimum density value at which the plot should be truncated.
bnw a logical value, true for a black and white plot, with different densities identified using line type (lty), false for a colour plot, with different densities identified using line colour (col)
col.or.type Colour or type of line to use
granularity Number of points to calculate quantiles and density at — see em{details}
xlab X axis label
ylab Y axis label
quant.probs Quantiles of distribution to return (see em{value} below). Set to NULL to suppress this return entirely.
... arguments that get passed to plot if this is a new plot

Details

The generalised lambda distribution is defined in terms of its quantile function. The density of the distribution is available explicitly as a function of depths, u, but not explicitly available as a function of x. This function calculates quantiles and depths as a function of depths to produce a density plot plotgld or cumulative probability plot plotglc.

The plot can be truncated, either by restricting the values using xlim — see par for details, or by the truncate argument, which specifies a minimum density. This is recommended for graphs of densities where the tail is very long.

Value

A number of quantiles from the distribution, the default being the minimum, maximum and quartiles.

Author(s)

Robert King, robert.king@newcastle.edu.au, http://maths.newcastle.edu.au/~rking/

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.

Ramberg, J. S. & Schmeiser, B. W. (1974), An approximate method for generating asymmetric random variables, Communications of the ACM 17, 78–82.

Karian, Z.E. & Dudewicz, E.J. (2000), Fitting Statistical Distributions to Data: The generalised Lambda Distribution and the Generalised Bootstrap Methods, CRC Press.

http://maths.newcastle.edu.au/~rking/gld/

See Also

GeneralisedLambdaDistribution

Examples

plotgld(0,1.4640474,.1349,.1349,main="Approximation to Standard Normal", 
sub="But you can see this isn't on infinite support")

[Package Contents]