bf_meta_message

0th

Percentile

Bayes factor message for random-effects meta-analysis

Bayes factor message for random-effects meta-analysis

Usage
bf_meta_message(
  data,
  k = 2,
  d = "norm",
  d.par = c(mean = 0, sd = 0.3),
  tau = "halfcauchy",
  tau.par = c(scale = 0.5),
  iter = 10000,
  summarize = "stan",
  caption = NULL,
  messages = TRUE,
  ...
)
Arguments
data

data frame containing the variables for effect size y, standard error SE, labels, and moderators per study.

k

Number of digits after decimal point (should be an integer) (Default: k = 2).

d

the prior distribution of the average effect size \(d\) specified either as the type of family (e.g., "norm") or via prior.

d.par

prior parameters for \(d\) (only used if d specifies the type of family).

tau

the prior distribution of the between-study heterogeneity \(\tau\) specified either as a character value (e.g., "halfcauchy") or via prior.

tau.par

prior parameters for \(\tau\) (only used if tau specifies the type of family).

iter

number of MCMC iterations using Stan.

summarize

how to estimate parameter summaries (mean, median, SD, etc.): Either by numerical integration (summarize = "integrate") or based on MCMC/Stan samples (summarize = "stan").

caption

The text for the plot caption.

messages

Decides whether messages references, notes, and warnings are to be displayed (Default: TRUE).

...

further arguments passed to rstan::sampling (see stanmodel-method-sampling). Relevant MCMC settings concern the number of warmup samples that are discarded (warmup=500), the total number of iterations per chain (iter=2000), the number of MCMC chains (chains=4), whether multiple cores should be used (cores=4), and control arguments that make the sampling in Stan more robust, for instance: control=list(adapt_delta=.97).

Aliases
  • bf_meta_message
Examples
# NOT RUN {
# }
# NOT RUN {
# setup
set.seed(123)
library(metaBMA)

# creating a dataframe
(df <-
  structure(
    .Data = list(
      study = c("1", "2", "3", "4", "5"),
      estimate = c(
        0.382047603321706,
        0.780783111514665,
        0.425607573765058,
        0.558365541235078,
        0.956473848429961
      ),
      std.error = c(
        0.0465576338644502,
        0.0330218199731529,
        0.0362834986178494,
        0.0480571500648261,
        0.062215818388157
      )
    ),
    row.names = c(NA, -5L),
    class = c("tbl_df", "tbl", "data.frame")
  ))

# getting Bayes factor in favor of null hypothesis
ggstatsplot::bf_meta_message(
  data = df,
  k = 3,
  iter = 1500,
  messages = TRUE
)
# }
# NOT RUN {
# }
Documentation reproduced from package ggstatsplot, version 0.1.4, License: GPL-3 | file LICENSE

Community examples

Looks like there are no examples yet.