plot.starship: Plots to compare a fitted generalised lambda distribution to...

View source: R/methods.R

plot.starshipR Documentation

Plots to compare a fitted generalised lambda distribution to data

Description

Plots to compare a fitted Generalised Lambda Distribution to data. This works with fitted gld objects from starship or fit.fkml.

Usage

## S3 method for class 'starship'
plot(x, data, ask = NULL, one.page = FALSE, 
    breaks = "Sturges", plot.title = "default",...)

Arguments

x

An object of class starship. These are produced by the fitting functions fit.fkml and starship.

data

Data to which the gld was fitted. Leave this as NULL if the return.data argument was TRUE in the call that created (starship or fit.fkml)

ask

Ask for user input before next plot. The default of NULL changes to TRUE if one.page is FALSE and plot is called interactively, otherwise it changes to FALSE this is then passed to par(ask). Does not permanently change this setting. The argument is ignored if one.page is TRUE

one.page

If TRUE, put the two plots on one page using par(mfrow=c(2,1)). Does not permanently change this setting.

breaks

Control the number of histogram bins — passed to hist.

plot.title

Main title for histogram and QQ — passed to hist(main=) and qqgl(main=). If you set this to "default", it will include the fitting method and gld type, for example “Starship fit of FMKL type GLD”.

...

arguments passed to plot AND hist

Details

This function produces a Q-Q plot of the data against the fitted generalised lambda distribution and a histogram of the data overlaid with the fitted probability density function.

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.

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

King, R.A.R. & MacGillivray, H. L. (1999), A starship method for fitting the generalised lambda distributions, Australian and New Zealand Journal of Statistics 41, 353–374

https://github.com/newystats/gld/

See Also

starship,

Examples

data <- rgl(100,0,1,.2,.2)
starship.result <- starship(data,optim.method="Nelder-Mead",initgrid=list(lcvect=(0:4)/10,
ldvect=(0:4)/10),return.data=TRUE)
plot(starship.result)

gld documentation built on Oct. 23, 2022, 5:05 p.m.

Related to plot.starship in gld...