simulate_Bf: Function simulating studies and Bayesian sequential analyses

View source: R/Bf_simulation.R

simulate_BfR Documentation

Function simulating studies and Bayesian sequential analyses

Description

This function...

Usage

simulate_Bf(
  sd_of_theory,
  sd1,
  sd2 = NULL,
  correlation = 0,
  threshold = c(3, 6, 10),
  stopping_rule = c("optional", "fixed"),
  n = 100,
  iterations = 5,
  Bf_calculation = c("Bf_normal", "Bf_cauchy"),
  tail = c(1, 2),
  true_effect = TRUE
)

Arguments

sd_of_theory

numeric.

sd1

numeric.

sd2

numeric.

correlation

numeric.

threshold

integer.

stopping_rule

character.

n

integer.

iterations

integer.

Bf_calculation

function object.

tail

integer.

true_effect

logical.

Value

The function returns a tibble with two columns: 'id' that contains the unique identifier of the given iteration, and 'hit' which contains whether the resulting Bayes factor was larger than the specified threshold ('2'), inconclusive ('0'), or smaller than 1 / threshold ('1').


BencePalfi/SampleSizeBF documentation built on April 3, 2025, 2:01 p.m.