Last data update: 2014.03.03

R: Compare different elicitated densities.
comparePlotR Documentation

Compare different elicitated densities.

Description

Compare different elicitated distributions in a trellis display.

Usage

comparePlot(..., type = c("density", "cdf"), deriv,
            points = TRUE, superpose = FALSE, n = 101,
            xlab= "", ylab, addArgs = NULL)

Arguments

...

Fitted SEL objects separated by a comma.

type

Determines whether to plot densities or cdfs (ignored if deriv is not missing).

deriv

Specify derivative of the expert's density to be plotted.

points

Logical indicating whether elicited quantiles should be displayed, when displaying the cdf.

superpose

Logical indicate if plots should be superposed.

n

Integer, number of points used for plotting.

xlab, ylab

Labels for x-axis and y-axis. If ylab is missing the value of type is used.

addArgs

List specifying additional arguments for xyplot function, list elements should match the corresponding arguments of the xyplot function.

Author(s)

Bjoern Bornkamp

References

Bornkamp, B. and Ickstadt, K. (2009). A Note on B-Splines for Semiparametric Elicitation. The American Statistician, 63, 373–377

See Also

SEL, plot.SEL

Examples

# example from O'Hagan et al. (2006)
x <- c(177.5, 183.75, 190, 205, 220)
y <- c(0.175, 0.33, 0.5, 0.75, 0.95)

default   <- SEL(x, y, Delta = 0.05, bounds = c(165, 250))
bernst    <- SEL(x, y, d = 10, N = 0, Delta = 0.05, bounds = c(165, 250))
unifknots <- SEL(x, y, d = 3, N = 5, Delta = 0.05, bounds = c(165, 250))
lin       <- SEL(x, y, d = 1, inknts = x, Delta = 0.05, bounds = c(165, 250))
comparePlot(default, bernst, unifknots, lin, type = "cdf")
comparePlot(default, bernst, unifknots, lin, type = "density")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SEL)
Loading required package: splines
Loading required package: quadprog
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SEL/comparePlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: comparePlot
> ### Title: Compare different elicitated densities.
> ### Aliases: comparePlot
> ### Keywords: misc
> 
> ### ** Examples
> 
> # example from O'Hagan et al. (2006)
> x <- c(177.5, 183.75, 190, 205, 220)
> y <- c(0.175, 0.33, 0.5, 0.75, 0.95)
> 
> default   <- SEL(x, y, Delta = 0.05, bounds = c(165, 250))
> bernst    <- SEL(x, y, d = 10, N = 0, Delta = 0.05, bounds = c(165, 250))
> unifknots <- SEL(x, y, d = 3, N = 5, Delta = 0.05, bounds = c(165, 250))
> lin       <- SEL(x, y, d = 1, inknts = x, Delta = 0.05, bounds = c(165, 250))
> comparePlot(default, bernst, unifknots, lin, type = "cdf")
> comparePlot(default, bernst, unifknots, lin, type = "density")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>