# sample data
data <- tibble::tibble(
TE = c(0.95, 1.2),
seTE = c(0.25, 0.5),
studlab = c("A", "B"))
# run meta-analysis
ma <- meta::metagen(
TE = TE,
seTE = seTE,
studlab = studlab,
data = data)
# get weights of each study
weights <- meta:::weights.meta(ma) %>%
tibble::rownames_to_column() %>%
dplyr::mutate(rscale = w.random / max(w.random)) %>%
dplyr::pull(rscale)
# make forest plot
meta::forest(ma, squaresize = weights)
this got following error message
Error: Argument 'squaresize' must be a numeric of length 1.
it seems that meta::forest can only output fixed-size squarebox when input is a metagen object....