| oc_coverage {tipmap} | R Documentation | 
Assessing coverage
Description
Assessment of coverage of posterior intervals for a given weight and evidence level, using simulated data as input.
Usage
oc_coverage(
  m,
  se,
  true_effect,
  weights = seq(0, 1, by = 0.01),
  map_prior,
  sigma,
  n_cores = 1,
  eval_strategy = "sequential"
)
Arguments
m | 
 Numerical vector of simulated effect estimates.  | 
se | 
 Numerical vector of simulated standard errors (  | 
true_effect | 
 Numerical value, representing the true treatment effect (usually the mean of the simulated   | 
weights | 
 Vector of weights of the informative component of the MAP prior (defaults to   | 
map_prior | 
 A MAP prior containing information about the trials in the source population, created using   | 
sigma | 
 Standard deviation of the weakly informative component of the MAP prior, recommended to be the unit-information standard deviation.  | 
n_cores | 
 Integer value, representing the number of cores to be used (defaults to 1); only applies if   | 
eval_strategy | 
 Character variable, representing the evaluation strategy, either "sequential", "multisession", or "multicore" (see documentation of   | 
Value
A 2-dimensional array containing results on coverage.
See Also
Examples
set.seed(123)
n_sims <- 5 # small number for exemplary application 
sim_dat <- list(
  "m" = rnorm(n = n_sims, mean = 1.15, sd = 0.1),
  "se" = rnorm(n = n_sims, mean = 1.8, sd = 0.3)
)
results <- oc_coverage(
  m = sim_dat[["m"]],
  se = sim_dat[["se"]],
  true_effect = 1.15,
  weights = seq(0, 1, by = 0.01), 
  map_prior = load_tipmap_data("tipmapPrior.rds"), 
  sigma = 16.23
) 
print(results)