Skip to content
Prev 314397 / 398503 Next

a problem for metafor package

Dear Xudong,

First of all, most attachments are stripped on r-help -- yours didn't make it through either. Since you sent a separate e-mail to me personally (including the attachment), I can see what you want to accomplish, but let's keep this on the list.

Second, your mail to r-help contained the "welcome" message you received when you signed up for the mailing list. That message also contained your password (I removed that part from your message below). Maybe not such a wise thing to do.

Now, regarding your question. You could just include the information from the whole study and the two subgroups in the dataset and then use the forest() function. However, for computing the overall estimate (in case you also want to include this in the forest plot), you need to decide how that should be done. Do you want to just count the results from whole study or just the two subsets? (using the information from the whole study and the two subsets would be double-counting and not appropriate). In either case, you could then pass the respective data to rma(), compute the overall estimate, and add it to the forest plot using the addpoly() function.

I suggest carefully studying:

?forest.default
?addpoly.default

and especially the examples. If you then get stuck, please provide minimal and self-contained code that can be used as a starting point for a more specific response.

Best,
Wolfgang

--   
Wolfgang Viechtbauer, Ph.D., Statistician   
Department of Psychiatry and Psychology   
School for Mental Health and Neuroscience   
Faculty of Health, Medicine, and Life Sciences   
Maastricht University, P.O. Box 616 (VIJV1)   
6200 MD Maastricht, The Netherlands   
+31 (43) 388-4170 | http://www.wvbauer.com