plotLCP: Plot local coverage probabilities to assess calibration and...

View source: R/plotLCP.R

plotLCPR Documentation

Plot local coverage probabilities to assess calibration and sharpness

Description

Plot local coverage probabilities to assess calibration and sharpness

Usage

plotLCP(
  E,
  U,
  ordX = NULL,
  aux = NULL,
  logX = FALSE,
  prob = c(0.95),
  nBin = NULL,
  equiPop = TRUE,
  popMin = 30,
  logBin = TRUE,
  intrv = NULL,
  slide = FALSE,
  binomCI = c("wilson", "wilsoncc", "clopper-pearson", "agresti-coull", "jeffreys"),
  plot = TRUE,
  mycols = 1:length(prob),
  xlab = "Calculated value",
  xlim = NULL,
  ylim = c(0, 1),
  title = "",
  legLoc = "bottom",
  legNcol = 3,
  label = 0,
  gPars = ErrViewLib::setgPars()
)

Arguments

E

(vector) Errors

U

(matrix) Prediction uncertainties

ordX

(vector) set of abscissas to order sample

aux

(vector) auxilliary vector to resolve ties in ordX sorting

logX

(logical) log-transform abscissas

prob

(vector) a set of coverage probabilities for the PUs

nBin

(integer) number of intervals for local coverage stats

equiPop

(logical) generate intervals with equal bin counts (default: 'equiPop = TRUE')

popMin

(integer) minimal bin count in an interval

logBin

(logical) if 'equiPop = FALSE', one can choose between equal range intervals, or equal log-range intervals (default 'logBin = TRUE')

intrv

(object) intervals generated by 'genIntervals' (default: 'NULL')

slide

(logical) use sliding window

binomCI

(string) name of method to estimate Binomial Proportion CI

plot

(logical) plot the results

mycols

(vector) a set of color indexes to gPars colors

xlab

(string) abscissa label

xlim

(vector) range for abscissa

ylim

(vector) limits of the y axis

title

(string) a title to display above the plot

legLoc

(string) location of legend (see xy.coord)

legNcol

(integer) number of columns for legend

label

(integer) index of letter for subplot tag

gPars

(list) graphical parameters

Value

Invisibly returns a list of LCP results. Mainly used for its plotting side effect.

Examples


  uE  = sqrt(rchisq(1000, df = 4))  # Re-scale uncertainty
  E   = rnorm(uE, mean=0, sd=uE)    # Generate errors
  plotLCP(E, cbind(0.32*uE, uE, 1.96*uE), prob=c(0.25,0.67,0.95), ordX = uE)


ppernot/ErrViewLib documentation built on June 1, 2024, 4:33 a.m.