fun.plot.many.gld: Plotting many univariate generalised lambda distributions on...

fun.plot.many.gldR Documentation

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

fun.plot.fit, fun.plot.fit.bm

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)

 opar <- par() 
 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"))

 par(opar)



GLDEX documentation built on Aug. 21, 2023, 9:08 a.m.