comparison_plot: Plot several bmops and true density

Description Usage Arguments Value Examples

View source: R/4-comparison-functions.R

Description

Plot several bmops and true density

Usage

1
2
3
4
comparison_plot(bmop.list, dtrue = NULL, colors = NULL, lwd = 3,
  type = "l", type.true = "l", col.true = "red",
  names.bmop = 1:length(bmop.list), legend.display = T,
  legend.pos = "topleft", file = NULL, ylim = c(0, 1), ...)

Arguments

bmop.list

list of bmop objects (1 dimensional)

dtrue

function, true density function

colors

NULL or vector of colors

lwd

graphical parameter see par

type

graphical parameter see par

type.true

as type, but just for true density plot

col.true

as col graphical parameter but for dtrue density plot

names.bmop

vector for the names showed in legend

legend.display

logical, to show or not the legend

legend.pos

string for the position of the legend "top", "left", "topright", etc.

file

an optional file name to save the plot

ylim

parameter to set the plot correctly, set to NULL for automatic setting

...

more parameters to be passed to dtrue

Value

invisible()

Examples

1
2
3
4
5
6
7
data<-rnorm(50)
bmop1<-bmop_fit(data)
bmopPar(mle=TRUE)
bmop2<-bmop_fit(data)
bmopPar(mle=FALSE)
comparison_plot(list(bmop1,bmop2),dtrue=dnorm,
                 names.bmop=c("Fast","MLE"))

gherardovarando/Rbmop documentation built on May 17, 2019, 4:17 a.m.