fun.plot.many.gld | R Documentation |
This is a variant of the fun.plot.fit
function.
fun.plot.many.gld(fit.obj, data, xlab="", ylab="Density", main="", legd="",
param.vec)
fit.obj |
A matrix of generalised lambda distibutions parameters
from |
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. |
A graph showing the different distributions on the same page.
The data part of the function is not plotted, to see the dataset use the
fun.plot.fit
function.
Steve Su
fun.plot.fit
, fun.plot.fit.bm
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.