Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fun.plot.many.gld

Plotting many univariate generalised lambda distributions on one page.


Description

This is a variant of the fun.plot.fit function.

Usage

fun.plot.many.gld(fit.obj, data, xlab="", ylab="Density", main="", legd="",
param.vec)

Arguments

fit.obj

A matrix of generalised lambda distibutions parameters from fun.data.fit.ml, fun.data.fit.hs, fun.data.fit.hs.nw, fun.RPRS.ml, fun.RMFMKL.ml, fun.RPRS.hs, fun.RMFMKL.hs, fun.RPRS.hs.nw, fun.RMFMKL.hs.nw functions. Or a matrix of generalised lambda distribution parameters.

data

Dataset to be plotted or two values showing the ranges of value to be compared.

xlab

X-axis labels.

ylab

Y-axis labels.

main

Title for the plot.

legd

Legend for the plot.

param.vec

A vector showing the types of generalised lambda distributions. This can be "rs" or "fmkl", only needed if you want to put your own parameters for generalised lambda distributions which are not generated from a fitting algorithm in this package.

Value

A graph showing the different distributions on the same page.

Note

The data part of the function is not plotted, to see the dataset use the fun.plot.fit function.

Author(s)

Steve Su

See Also

Examples

## Fit the dataset
# junk<-rnorm(1000,3,2)
# result.hs<-fun.data.fit.hs(junk,rs.default = "Y", fmkl.default = "Y", 
# rs.leap=3, fmkl.leap=3,rs.init = c(-1.5, 1.5), fmkl.init = c(-0.25, 1.5),
# no.c.rs=50,no.c.fmkl=50)

# par(mfrow=c(2,2))

## Plot the entire data range
# fun.plot.many.gld(result.hs,junk,"x","density","",
# legd=c("RPRS.hs", "RMFMKL.hs"))

## Plot and compare parts of the distributions
# fun.plot.many.gld(result.hs,c(1,2),"x","density","",legd=c("RPRS.hs", 
#"RMFMKL.hs"))
# fun.plot.many.gld(result.hs,c(0.1,0,2),"x","density","",legd=c("RPRS.hs", 
#"RMFMKL.hs"))
# fun.plot.many.gld(result.hs,c(3,4),"x","density","",legd=c("RPRS.hs", 
#"RMFMKL.hs"))

GLDEX

Fitting Single and Mixture of Generalised Lambda Distributions (RS and FMKL) using Various Methods

v2.0.0.7
GPL (>= 3)
Authors
Steve Su, with contributions from: Diethelm Wuertz, Martin Maechler and Rmetrics core team members for low discrepancy algorithm, Juha Karvanen for L moments codes, Robert King for gld C codes and starship codes, Benjamin Dean for corrections and input in ks.gof code and R core team for histsu function.
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.