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

qqplot.gld.bi

Do a quantile plot on the bimodal distribution fits.


Description

This plots the theoretical and actual data quantiles to allow the user to examine the adequacy of two gld distributions mixture fit.

Usage

qqplot.gld.bi(data, fit, param1, param2, len = 10000, name = "", 
corner = "topleft",type="",range=c(0,1),xlab="",main="")

Arguments

data

Data fitted.

fit

Parameters of distribution fit.

param1

Can be either "rs" or "fmkl".

param2

Can be either "rs" or "fmkl".

len

Precision of the quantile calculatons. Default is 10000. This means 10000 points are taken from 0 to 1.

name

Name of the data set, added to the title of plot if main is missing.

corner

Can be "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right", "center" as in legend.

type

This can be "" or "str.qqplot", the first produces the raw quantiles and the second plot them on a straight line. Default is "".

range

This is the range for which the quantiles are to be plotted. Default is c(0,1).

xlab

x axis label, if left blank, then default is "Data"

main

Title of the plot, if left blank, a default title will be added.

Value

A plot is given.

Author(s)

Steve Su

See Also

Examples

# set.seed(1000)

# junk<-rweibull(300,3,2)

## Fitting mixture of generalised lambda distributions on the data set using 
## both the maximum likelihood and partition maximum likelihood and plot the 
## resulting fits
# junk<-fun.auto.bimodal.ml(faithful[,1],per.of.mix=0.1,clustering.m=clara,
# init1.sel="rprs",init2.sel="rmfmkl",init1=c(-1.5,1.5),init2=c(-0.25,1.5),
# leap1=3,leap2=3)
# fun.plot.fit.bm(nclass=50,fit.obj=junk,data=faithful[,1],
# name="Maximum likelihood using",xlab="faithful1",param.vec=c("rs","fmkl"))

## Do a quantile plot on the raw quantiles
# qqplot.gld.bi(faithful[,1],junk$par,param1="rs",param2="fmkl",
# name="RS FMKL ML fit")

## Or a qq plot to examine deviation from straight line
# qqplot.gld.bi(faithful[,1],junk$par,param1="rs",param2="fmkl",
# name="RS FMKL ML fit",type="str.qqplot")

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.