oc_pos | R Documentation |
Assessment of the probability of truly or falsely (depending on simulated scenario) rejecting the null hypothesis of interest for a given weight and evidence level, using simulated data as input.
oc_pos(
m,
se,
probs,
weights = seq(0, 1, by = 0.01),
map_prior,
sigma,
null_effect = 0,
direction_pos = T,
n_cores = 1,
eval_strategy = "sequential"
)
m |
Numerical vector of simulated effect estimates. |
se |
Numerical vector of simulated standard errors ( |
probs |
Vector of quantiles q, with 1 minus q representing an evidence level of interest (where positive effect estimate indicate a beneficial treatment). |
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. |
null_effect |
Numerical value, representing the null effect (defaults to 0). |
direction_pos |
Logical value, |
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 |
A 2-dimensional array containing probabilities, either of truly (probability of success) or falsely rejecting the null hypothesis of interest for a given weight and evidence level.
oc_bias
and oc_coverage
.
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_pos(
m = sim_dat[["m"]],
se = sim_dat[["se"]],
probs = c(0.025, 0.05, 0.1, 0.2),
weights = seq(0, 1, by = 0.01),
map_prior = load_tipmap_data("tipmapPrior.rds"),
sigma = 16.23,
null_effect = 0,
direction_pos = TRUE,
eval_strategy = "sequential",
n_cores = 1
)
print(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.