Skip to content

a problem for metafor package

3 messages · LiuXudong, John Kane, Viechtbauer Wolfgang (STAT)

#
Dear sir or madam
 
I want to know how to use "metafor"package do a meta anlysis,  forest plot  show the results of whole study and  results of two subgroups
like this the forest plot show in the attachment.
 
looking forword to your reply
 

 
Regards and Cheers
 
Xudong Liu

 
School of Public Health and Primary Care
The Chinese University of Hong Kong
Email: liuxudong at cuhk.edu.hk
#
The attachement did not come through  and we need some idea of what you are doing. Please see https://github.com/hadley/devtools/wiki/Reproducibility for some ideas of what we need.  

And please read the posting guide

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
#
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