plotStratZMS: Plot local <Z^2> for stratified conditioning variables

View source: R/plotStratZV.R

plotStratZMSR Documentation

Plot local <Z^2> for stratified conditioning variables

Description

Plot local <Z^2> for stratified conditioning variables

Usage

plotStratZMS(
  X,
  Z,
  mZ2 = 1,
  aggregate = TRUE,
  popMin = 100,
  greedy = TRUE,
  nBoot = 5000,
  parallel = FALSE,
  method = c("bootstrap", "stud", "auto"),
  BSmethod = c("bca", "perc", "basic"),
  plot = TRUE,
  xlab = "Conditioning variable",
  ylim = NULL,
  title = "",
  label = 0,
  gPars = ErrViewLib::setgPars()
)

Arguments

X

(vector) conditioning variable

Z

(vector) set of z-score values to be tested

mZ2

(numeric) target value for <Z^2> (default: 1)

aggregate

(logical) aggregate contiguous strata smaller than popMin

popMin

(integer) minimal count in a stratum

greedy

(logical) use greedy algorithm to merge strata (default: TRUE)

nBoot

(integer) number of bootstrap replicas

parallel

(logical) parallelized bootstrap (default: 'FALSE')

method

(string) method used to estimate 95 percent CI on <Z^2>

BSmethod

(string) bootstrap variant

plot

(logical) plot the results

xlab

(string) X axis label

ylim

(vector) limits of the y axis

title

(string) a title to display above the plot

label

(integer) index of letter for subplot tag

gPars

(list) graphical parameters

Value

Invisibly returns a list of LZV 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
  X   = signif(uE,1)
  plotStratZMS(X, E/uE, ylim = c(0, 2))


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