Help on funnel plot

Beli

New Member
#1
Hi everyone
Looking for some help on how to get better funnel. I am new to R, using v 4.1
When I used this function, I got the funnel plot attached.
funnel(m.raw, xlab="Mean difference (hours)",
studlab = FALSE,
xlim = c(-4,8),
cex = 1,
bg= "black")

Others are able to get much better and colourful funnel. Is this related to the version i'm using? and how to improve it?

Thanks
 

Attachments

hlsmith

Less is more. Stay pure. Stay poor.
#3
Don't know off-hand, let us know if you figure it out. I'll share if I come across it. You should add a ref line for the null value as well. Some people also do a ?trim and fill approach for where potentially missing studies would be, but the idea of publication biases by visualization is up for debate.
 

Buckeye

Active Member
#4
I did a quick search and found this: https://www.metafor-project.org/doku.php/plots:funnel_plot_variations I downloaded the "metafor" package (version 3.4-0) and ran the first few lines of code to get the attached plot. You might try updating that package specifically to the latest version if it's not already. Have you heard of ggplot2? It is an entire package dedicated to making colorful plots.
 

Attachments

Last edited:

Beli

New Member
#5
Thank you hlsmith and Buckeye. I added refline but nothing changed.
I also updated the metafor and package and ggplot2, still the same. Is this related to metafor/R version. I
Buckeye, what R version you're using? I can see you can get a better funnel. Mine is 4.1
 

Buckeye

Active Member
#6
My version of R is a little older 4.0.3 What happens if you run the below lines of code like in the link I shared? Here is the R documentation link: https://www.rdocumentation.org/packages/metafor/versions/3.0-2/topics/funnel Take a look at the "hline", "shade", and "back" arguments. I suspect your reference line is white on a white background, so it's invisible. Try changing hline="lightblue" or something.

Code:
library(metafor)

### fit equal-effects model
res <- rma(yi, vi, data=dat.hackshaw1998, measure="OR", method="EE")

### draw funnel plots
funnel(res, main="Standard Error")

### try this
funnel(res, main="Standard Error",back = "lightgrey")
 
Last edited:

Beli

New Member
#10
Thank you so much Buckeye. I tried yours, didn't work out. I think it is related to the version
I edited my answer quite a few times. Let me know if you didn't catch it all.
Buckeye, thank you very much. Sorry I missed it. But c the function works for dichotomous data - measure OR
I have also continuous data - measure MD
Any suggestion on how to change the argument?

### fit equal-effects model
res <- rma(yi, vi, data=dat.hackshaw1998, measure="OR", method="EE")

### draw funnel plots
funnel(res, main="Standard Error")

### try this
funnel(res, main="Standard Error",back = "lightblue")
 

Attachments

Buckeye

Active Member
#12
Hmm. I'm not sure. Maybe there is another way to create the plot using ggplot2. ggplot2 allows the user to pretty much customize everything about the plot. The tricky part is finding the right code to do what you want. Is there another name for a "funnel plot"?