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

fun.plot.fit

Plotting the univariate generalised lambda distribution fits on the data set.


Description

This function is designed for univariate generalised lambda distribution fits only.

Usage

fun.plot.fit(fit.obj, data, nclass = 50, xlab = "", name = "", param.vec,
ylab="Density", main="")

Arguments

fit.obj

Fitted object 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

data

Dataset to be plotted.

nclass

Number of class of histogram, the default is 50.

xlab

Label on the x axis.

name

Naming the type of distribution fits.

param.vec

A vector describing the type of generalised lambda distribution used in the fit.obj.

ylab

Label on the y axis.

main

Title of the graph.

Value

A graphical output showing the data and the resulting distributional fits.

Note

If the distribution fits over fits the peak of the distribution, it can be difficult to see the actual data set.

Author(s)

Steve Su

See Also

Examples

## Generate Normally distribute random numbers as dataset
# junk<-rnorm(1000,3,2)

## Fit the data set using fun.data.fit.ml. 
## Also, fun.data.fit.hs or fun.data.fit.hs.nw can be used.
# obj.fit<-fun.data.fit.ml(junk)

## Plot the resulting fits
# fun.plot.fit(obj.fit,junk,xlab="x",name=".ML",param.vec=c("rs","fmkl","fmkl"))

## This function also works for singular fits such as those by fun.RPRS.ml,
## fun.RMFMKL.ml, fun.RPRS.hs, fun.RMFMKL.hs, fun.RPRS.hs.nw, fun.RMFMKL.hs.nw
# junk<-rnorm(1000,3,2)
# obj.fit<-fun.RPRS.ml(junk)
# fun.plot.fit(obj.fit,junk,xlab="x",name="RPRS.ML",param.vec=c("rs"))

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.