confPlot: Plot confidence intervals of repeated estimates for one...

View source: R/plotting.R

confPlotR Documentation

Plot confidence intervals of repeated estimates for one method

Description

Plot confidence intervals of the repeated estimates of b for one method. Gets called eight times to produce Figure 4 of MEE paper and Figure 5 of MEPS paper. Plots horizontal lines for the intervals, colour coded as to whether or not they include the true value of b.

Usage

confPlot(
  repConf,
  legName,
  b.true = b.known,
  inCol = "darkgrey",
  outCol = "blue",
  vertCol = "red",
  pchVal = 20,
  cexVal = 0,
  xLim = NULL,
  colourCode = TRUE,
  vertThick = 1,
  horizThick = 0.3,
  thin = 33,
  horizLines = FALSE,
  horizLinesOut = TRUE,
  horizLinesIn = TRUE,
  yLab = "Sample number",
  yTicks = seq(0, 300, 50),
  yLabels = TRUE,
  vertFirst = FALSE,
  insetVal = c(-0.08, -0.06),
  insetVal2 = c(-0.08, 0.07),
  xsmallticks = NULL,
  legLoc = "topleft"
)

Arguments

repConf

data frame with columns confMin and confMax, the minimum and maximum of the 95\ corresponding to each simulated data set. When confPlot is called, for some methods b = slope - 1 or b = slope - 2, which gets done in the call.

legName

legend name for that panel

b.true

true known value of b (as used for simulating the data)

inCol

colour for intervals that b.true is inside

outCol

colour for intervals that b.true is outside

vertCol

colour of vertical line for b.true

pchVal

pch for points at endpoints of intervals

cexVal

size of points (default of 0 does not plot them)

xLim

x-axis range

colourCode

colour code the figure

vertThick

thickness of vertical line for b.true

horizThick

thickness of horizontal lines

thin

number of values to thin the values for plotting. Only works for 33 or 99 for now (since they are factors of 9999, the value used in simulations).

horizLines

whether to plot horizontal grey lines or not as example (not needed now since doing lines for intervals)

horizLinesOut

whether to plot horizontal lines for intervals for which true value is outside the interval

horizLinesIn

whether to plot horizontal lines for intervals for which true value is inside the interval

yLab

label for y-axis

yTicks

where to have tickmarks on y-axis

yLabels

whether or not to label tickmarks on y-axis

vertFirst

whether or not to plot vertical line first in order to see the horizontal lines better (for LCD plot)

insetVal

inset shift for naming the panel

insetVal2

inset shift for printing observed coverage percentage

xsmallticks

where to put unlabelled small tick marks on x-axis

legLoc

where to put the legend, as the first argument in legend()

Value

plots a panel and returns what is plotted as a sorted data frame

Author(s)

Andrew Edwards


andrew-edwards/sizeSpectra documentation built on June 28, 2023, 7:09 p.m.