# NOT RUN {
# setup
set.seed(123)
library(statsExpressions)
library(metaplus)
# renaming to what `statsExpressions` expects
df <- dplyr::rename(mag, estimate = yi, std.error = sei)
# ----------------------- parametric ---------------------------------------
# making subtitle
expr_meta_random(
data = df,
k = 3
)
# making caption
expr_meta_random(
data = df,
output = "caption"
)
# ----------------------- random -----------------------------------------
# creating expression
expr_meta_random(
data = df,
type = "random",
random = "normal",
output = "dataframe"
)
# ----------------------- Bayes Factor -----------------------------------
# making subtitle
expr_meta_random(
data = df,
type = "bayes",
k = 3,
# additional arguments given to `metaBMA`
iter = 5000,
summarize = "integrate",
control = list(adapt_delta = 0.99, max_treedepth = 15)
)
# }
Run the code above in your browser using DataLab