# oc_bias: Assessing bias In tipmap: Tipping Point Analysis for Bayesian Dynamic Borrowing

 oc_bias R Documentation

## Assessing bias

### Description

Assessment of absolute bias in posterior means and medians for a given weight and evidence level, using simulated data as input.

### Usage

``````oc_bias(
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 (`m` and `se` need to have the same length). `true_effect` Numerical value, representing the true treatment effect (usually the mean of the simulated `m`). `weights` Vector of weights of the informative component of the MAP prior (defaults to `seq(0, 1, by = 0.01)`). `map_prior` A MAP prior containing information about the trials in the source population, created using `RBesT`; a mixture of normal distributions is required. `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` is not "sequential". `eval_strategy` Character variable, representing the evaluation strategy, either "sequential", "multisession", or "multicore" (see documentation of `future::plan`, defaults to "sequential").

### Value

A 2-dimensional array containing results on bias.

`oc_pos` and `oc_coverage`.

### 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_bias(
m = sim_dat[["m"]],
se = sim_dat[["se"]],
true_effect = 1.15,
weights = seq(0, 1, by = 0.01),