plotECSS: Plot effective current sample size (ECSS) on a grid

Description Usage Arguments Details Value Author(s) References Examples

Description

Plot effective current sample size (ECSS) on a grid for a list of priors.

Usage

1
plotECSS(priorlist, grid, n.target, min.ecss, progress = "text", ...)

Arguments

priorlist

A named list of priors. Elements can be RBesT betaMix or normMix objects, powerprior objects created by as.powerprior or StudyPrior mixture.prior objects.

grid

The grid of true data means (see details in link{ecss.mix}).

n.target

The sample size of interest at which the ECSS is evaluated

min.ecss

minimal ECSS of interest (usually negative)

progress

name of the progress bar to use, see create_progress_bar

...

Further arguments to be passed to ecss.

Details

Plot effective current sample size (ECSS) on a grid for a list of priors. This is useful to visualize the impact of a prior for a range of true values at planning stage, i.e. in prospective use before seeing the data. See also vignette and Wiesenfarth and Calderazzo (2019).

Value

plot

A "ggplot" object

data

A data frame with computed values

Author(s)

Manuel Wiesenfarth

References

Wiesenfarth, M., Calderazzo, S. (2019). Quantification of Prior Impact in Terms of Effective Current Sample Size. Submitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Normal Outcome
  # standard deviation
    sigma=1
  # baseline
    rob=c(0,10)
    vague <-mixnorm(vague=c(1, rob), sigma=sigma)
  # prior with nominal prior ESS=50
    inf=c(0,1/sqrt(50))
    info <-mixnorm(informative=c(1, inf), sigma=sigma)
  # robust mixture
    mix50 <-mixnorm(informative=c(.5, inf),vague=c(.5, rob), sigma=sigma)

plotECSS(priorlist=list(mix=mix50,info=info), grid=((-8:8)/10), n.target=200, 
          min.ecss=-200,sigma=sigma,prior.base=vague)

# See also vignette for more extensive example.

wiesenfa/ESS documentation built on June 19, 2019, 4:19 p.m.