Building two sets of data points on a funnel graph (metaphors for R)

I perform a meta-analysis of epidemiological data, where studies can be divided into two groups (for example, according to methodology). Is there a way to change the points plotted on the funnel graph to identify groups (for example, points and crosses)?
(Since pch.fill does when trimming is used) Thanks.

+5
source share
1 answer

For each study, there should be an indicator showing whether it is method A of method B, right? Suppose the variable is called StudyType (= 16 if method A, = 17 if method B), you can build them with another character by specifying "pch = StudyType". The plot will use pch = 16 for TypeA, and pch = 17 for TypeB.

### load BCG vaccine data data(dat.bcg) ### Attach study type (I just randomly made up some here): StudyType = sample(c(16,17),13,replace=T) ### meta-analysis of the log relative risks using a random-effects model res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, measure="RR", method="REML") ### standard funnel plot (Notice the pcd command) funnel(res, pch=StudyType) 

enter image description here

+3
source

All Articles