[R-meta] modifying the default forest plot

Viechtbauer Wolfgang (SP) wolfgang.viechtbauer at maastrichtuniversity.nl
Tue Dec 5 10:58:41 CET 2017


Ken already gave some pointers.

1) How could I get the author and year instead? 

Use the 'slab' argument. For example:

slab=paste(dat$author, dat$year, sep=", "))

(assuming that there are 'author' and 'year' variables in the data frame 'dat').

2) It would be better if I can get them arranged according to the observed effect size - is that possible? 

Use argument: order="obs"

3) Also, I would like to change the title of my X axis to 'Estimated Effect Size'
rather than the default title 'Observed Outcome'. 

Use argument: xlab="Estimated Effect Size"

4) Lastly, would it be possible to specify the exact weight assigned to each study in the forest plot?

Use argument: showweights=TRUE

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of Mukht Kaur
Sent: Tuesday, 05 December, 2017 6:30
To: r-sig-meta-analysis at r-project.org
Subject: [R-meta] modifying the default forest plot

Hi everyone!

I am new to meta-analysis methodology and I am using R software to do my
quantitative synthesis. I am using random effects model to analyse my
individual studies through rma function in metafor package.

By using 'forest(mymodelname)', I have a basic forest plot where my
individual studies are shown as Study 1, Study 2, and so on. How could I
get the author and year instead? It would be better if I can get them
arranged according to the observed effect size - is that possible? Also, I
would like to change the title of my X axis to 'Estimated Effect Size'
rather than the default title 'Observed Outcome'. Lastly, would it be
possible to specify the exact weight assigned to each study in the forest
plot?
Many thanks in advance for your help.

MK



More information about the R-sig-meta-analysis mailing list