I would like to make a funnel plot for a meta-analysis of Bland-Altman studies, with R regression test for symmetrie. On the x-axis the mean difference (bias) between two methods should be presented, on the y-axis the standard error (SD/√N).
However, the scripts described as an example online are based on data from 2x2 tables (outcome 1 and 2 for group 1 and 2), from which Relative Risk can be calculated by R. The problem is that my data consist of 1 bias (difference between both groups) and 1 SD of the bias.
Example:
library(metafor)
### load BCG vaccine data
dat <- get(data(dat.bcg))
show(dat.bcg)
### calculate log relative risks and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat)
### random-effects model
res <- rma(yi, vi, data=dat)
### standard funnel plot
funnel(res)
### classical Egger test
regtest(res, model="lm")
I do not know how to translate this script to a script for my situation. I have thought about several solutions:
Solution 1: Insert x-coordinates (bias) and y- coordinates (standard error) in R. After plotting the dots, R could perhaps calculate Egger, based on the plot. I do not know if R is able plot x- and y-coordinates and to calculate Egger based on x- and y-coordinates instead of raw data. I already tried as follows, but it didn’t work.
library(metafor)
mean.e<-c(-0.4, 0.3, 2.3))
sd.e<-c(1.55, 0.68, 3.22)
### fit random-effects model
res <- rma(yi=mean.e, vi=sd.e)
### classical Egger test
regtest(res, model="lm")
### standard funnel plot
funnel(res)
Solution 2: Make a script and insert the following data: mean(=bias).experimental, sd.experimental, n.experimental and mean.control, sd.control, n.control. As the data presented by the individual studies are already a bias (=mean difference) between two methods, there is no data available for a control group. This problem can be solved by adding extreme values for a virtual control group (mean 0, sd 0.0001, n 1000). Due to the extreme values the control group data has no influence on the outcome. So the outcome is equal to the experimental data, just how I want it. I hope R is able to calculate the bias (between experimental and virtual control group) and standard error and present it as a funnel plot, with Egger regression test. However, I do not know how to write such a script.
I hope somebody is able to help me, or could give me some good advice.
Thank you in advance!
Greetings Margot Sanders