guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
82 stars 32 forks source link

meta.forest; subgroup effect #49

Closed fohofmann closed 1 year ago

fohofmann commented 1 year ago

Hi Guido, hi everyone,

thank you for your help and the solution regarding the last issue (#48), and I am really sorry to bother you once again.

Given the previously explored example

# libraries
library(meta)
library(data.table)

# data
dt <- data.table(
 ID = rep(1:5, each=3),
 AE = rep(c("minor","major","deadly"),5),
 ni = rep(c(25,19,101,32,50), each=3),
 xi = c(2,3,3,4,1,0,29,13,4,7,4,1,7,2,1) )

# meta-analysis & forest plot
res <- metaprop(xi, ni, cluster=ID, subgroup=AE, data=dt)
forest(res, subgroup=T)

metaprop() works fine, and also estimates of the effect are reported. However, forest() does not plot the summary effect per subgroup, regardless how the arguments type.random, type.subgroupor type.subgroup.random are defined.

Any advices? Wrong configuration at my side, or a structural problem of forest()? Sorry once again, and all the best, Felix

guido-s commented 1 year ago

Felix,

It took me some time to look into this. Should be fixed now.

Best wishes, Guido

fohofmann commented 1 year ago

Thank you again for all your efforts, Guido!

Error in runMLM(c(list.mlm, list(data = data.frame(cluster = cluster[sel.4], : could not find function "runMLM" Calls: ... eval_with_user_handlers -> eval -> eval -> metaprop -> metagen

As far as I understand extrMLMand runMLMare wrapper-functions to pass over mlm-arguments to metafor:rma.mv. I would have expected their definition in meta-aux.R(comparable to runNN, but with preset func-arg or sth similar)?

guido-s commented 1 year ago

Classic mistake - I had the auxiliary functions in other files which I did not upload to the Git repository. I added them to meta-aux.R as suggested by you.

fohofmann commented 1 year ago

Thanks for getting back on this. Works perfectly fine now. Thank you!