fun.plot.fit: Plotting the univariate generalised lambda distribution fits...

fun.plot.fitR Documentation

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

fun.plot.fit.bm, 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

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 documentation built on Aug. 21, 2023, 9:08 a.m.

Related to fun.plot.fit in GLDEX...