II tried to do a Funnel plot of a dataset for a disease-prevention paper, view dataset here.
Got the plot, but am worried it is wrong.The dataset contains the
Lower control limit(LCL),
Upper control limit(UCL) and the
Standard Errors(SE)[of Ln(HR)] values, and I used the SE values to calculate Variances(
var in the dataset). Here is the code I used:
library(metafor) age <- read.csv("age.csv", header=TRUE) age res <- rma(yi=lnhr, vi=var, data=age) res funnel(res,xlab = "ln(HR)",ylab = "SE.ln(HR)")
The question I had was this:
In most studies I have seen, the Ln(HR) values are negative, whereas in the dataset I was working on, almost all are positive. So for the correct funnel, should I take
yi=-lnhr, or is
yi=lnhr the correct method, in the res object?
P.S:(According to the
Metafor repository linked here,
yi is effect-size, and
vi is the variance)
Update:Here are the results using the above code and dataset, taking
Random-Effects Model (k = 11; tau^2 estimator: REML)
tau^2 (estimated amount of total heterogeneity): 0.0001 (SE = 0.0002)
tau (square root of estimated tau^2 value): 0.0122
I^2 (total heterogeneity / total variability): 35.20%
H^2 (total variability / sampling variability): 1.54
Test for Heterogeneity:
Q(df = 10) = 16.8884, p-val = 0.0769**
And here is the funnel plot generated.