[R-meta] R metafor: question on funnel plot
Viechtbauer, Wolfgang (SP)
wolfg@ng@viechtb@uer @ending from m@@@trichtuniver@ity@nl
Tue Sep 11 11:11:38 CEST 2018
Dear Willemijn,
If 'modelINT0910' is a model fitted with rma.mv() ("three-level meta-analysis" would suggest so), then trimfill() should not work:
dat <- get(data(dat.konstantopoulos2011))
res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
trimfill(res)
yields:
Error in UseMethod("trimfill") :
no applicable method for 'trimfill' applied to an object of class "c('rma.mv', 'rma')"
If 'modelINT0910' was fitted with rma() (= rma.uni()), then the output of trimfill() shows the number of imputed points (i.e., just print 'tafINT'). So I am not entirely sure I understand your question. Or are you asking how to include this information in the plot itself? Then 'tafINT$k0' will show the number of imputed points. You could add this to the title, for example with:
funnel(tafINT, main=paste("Number of imputed points:", tafINT$k0))
Best,
Wolfgang
-----Original Message-----
From: Willemijn van Eldik [mailto:vaneldik using essb.eur.nl]
Sent: Tuesday, 11 September, 2018 10:12
To: 'r-sig-meta-analysis using r-project.org'; Viechtbauer, Wolfgang (SP)
Subject: R metafor: question on funnel plot
Dear all and Wolfgang Viechtbauer,
Using the following script to conduct a funnel plot and trim&fill analyses for my three-level meta-analysis, I was wondering if it is possible to request some numbers on the amount of imputed data points shown in the trim&fill analysis?
### set up 2x2 array for plotting
par(mfrow=c(2,2))
funnel(modelINT0910, main="SD")
tafINT <- trimfill(modelINT0910)
funnel(tafINT)
Thank you in advance,
Best, Willemijn
More information about the R-sig-meta-analysis
mailing list