I'm looking to get an average value based on a range of values each with associated error. I've found that meta.summaries from the rmeta
package seems to be working pretty well, but the error I have on the input values is only upper and lower bounds, not a standard error measurement, coming from use of epi.2by2
. Meta.summaries
needs a standard error.
Is there a way to make meta.summaries
use upper and lower bounds, or epi.2by2
to generate a s.e?
attach(DATA)
m <- summary(meta.summaries(RR,SE), conf.level = 0.95)
Maybe do you rely too much on packages? From Wikipedia's Odd-Ratio page, I can read:
The distribution of the log odds ratio is approximately normal with:
L ~ N( log(OR), s^2 )
... where s can be approximated by:
SE=sqrt(1 / n_11 + 1/n_01 + 1/n_00 + 1/n_10)
(Where n_11 are the number of cured among exposed to a drug, n_10 the number of cured among non exposed, etc.) You can thus compute very easily your standard errors. Suppose that you pack all your observation as a data set:
n <- 10 # number of odd-ratios
counts <- sample(20:100, replace = TRUE, size=4*n) # fake counts data
counts <- matrix(counts, cols=4) # one line = one experiment = one OR = 4
... you can then compute your standard errors as the following:
se <- sqrt(rowSums(1/counts))
Please note that:
This is an asymptotic approximation, and will not give a meaningful result if any of the cell counts are very small.
... and more generally that averaging odd-ratios sounds dubious, too me at least. If you have the original observations, then you can simply put all the counts together. If you don't, then you're going to overweight small studies in the process. I did not investigate in detail but there seems to be much discussion over the matter: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5352535/. You can also see what is said here on CrossValidated (the StackOverFlow for statistics).