[R] a problem for metafor package

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Mon Dec 31 16:55:32 CET 2012


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   

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of LiuXudong
> Sent: Monday, December 31, 2012 10:21
> To: r-help at r-project.org
> Subject: [R] a problem for metafor package
> 
> 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




More information about the R-help mailing list