# 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
bf_meta(
  data = df,
  k = 3,
  iter = 1500,
  messages = TRUE,
  # customizing analysis with additional arguments
  control = list(max_treedepth = 15)
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab