BayesianEvSyn_BF: Bayesian evidence synthesis based on Bayes factor values

View source: R/BayesianEvSyn_BF.r

BayesianEvSyn_BFR Documentation

Bayesian evidence synthesis based on Bayes factor values

Description

Bayesian evidence synthesis (BayesianEvSyn) aggregates the evidence for theory-based hypotheses from multiple studies that may use diverse designs to investigate the same central theory. There is also an interactive web application on my website to perform BayesianEvSyn: https://www.uu.nl/staff/RMKuiper/Websites%20%2F%20Shiny%20apps. In case Bayes factor (BF) values are used as input, the added-evidence approach is used in which the aggregated evidence from, says, 5 studies is stronger than as if the data were combined (as if that was possible).

Usage

BayesianEvSyn_BF(
  S,
  BFs,
  PriorWeights = NULL,
  Name_studies = 1:S,
  Name_Hypo = NULL,
  PrintPlot = T
)

Arguments

S

The number of (primary) studies. That is, the results (evidence) of S studies will be aggregated.

BFs

A matrix with BFs of size S x 'NrHypos+1', where 'NrHypos+1' stands for the number of theory-based hypotheses plus a safeguard hypothesis (the complement or unconstrained). Notably, only when the set of hypotheses cover the whol space / all theories (e.g., positive versus negative effect), then you can do without a safeguard hypothesis.

PriorWeights

Optional. Vector containing 'NrHypos+1' numbers that represent the prior belief for this model. By default, equal prior weights are used (i.e., 1/(NrHypos+1)). Notably, in case the prior weights do not sum to 1, it will be rescaled such that it does; which implies that relative importance can be used and not per se weights.

Name_studies

Optional. Vector of S numbers or S characters to be printed at the x-axis of the plot with GORIC(A) weights. Default: Name_studies = 1:S.

Name_Hypo

Optional. Vector containing 'NrHypos+1' characters which will be used for labelling the hypothesis. Default: H1, H2, ....

PrintPlot

Optional. Indicator whether plot of GORIC(A) weigths should be printed (TRUE; default) or not (FALSE). The GORIC(A) weights per study are plotted and the cumulative GORIC(A) weights (where those for the last study are the final ones).

Value

The output comprises, among other things, the cumulative and final evidence (BFs and posterior model probabilities (PMPs)) for the theory-based hypotheses.

Examples


S <- 4
BFts <- myBFs # Example based on S = 4 studies and 3 hypotheses:
# H0 <- "beta1 == 0"  # this hypothesis could have been left out
# Hpos <- "beta1 > 0"
# Hneg <- "beta1 < 0"
# Note that in this set the whole space is (all theories are) covered so the unconstrained is not needed as safeguard-hypothesis
BayesianEvSyn_BF(S, BFs)

# Change labels on x-axis in PMPs plot and give names to hypotheses #
# For example, let us say that the studies come from the years 2015, 2016, 2017, 2019.
# Because of unequal spacing, you may want to use numbers instead of characters:
Name_studies <- c(2015, 2016, 2017, 2019)
Name_Hypo <- c("H0", "Hpos", "Hneg")
GoricEvSyn_IC(S, Weights, Name_studies, Name_Hypo)

rebeccakuiper/GoricEvSyn documentation built on July 3, 2023, 6:41 a.m.