# Meta-analysis in R with standard errors instead of standard deviations {metafor}

This is the formula I would need to use to perform a meta-analysis in R using the package metafor:

REmodel <- rma(m1i=elev.mean,m2i=amb.mean,sd1i=?,
sd2i=?,n1i=?,n2i=?,data=NPPsiteWide,
measure="ROM")


Note that sd and n refers to standard deviations and sample size. The problem is that the dataset I am using (data gathered by others) contains se values, but not sd and n.

Is there any way I can still do the meta-analysis using the data I have without sd and n? Thanks

EDIT:

After following Wolfgang’s suggestion below, it seems I am doing something wrong because rma can’t calculate vi (all NA’s), and returns this error:

REmodel <- rma(m1i=elev.mean,m2i=amb.mean,sd1i=elev.se,
sd2i=amb.se,n1i=1,n2i=1,data=db,
measure="ROM",subset=Myc=="AM”)

Error in rma(m1i = elev.mean, m2i = amb.mean, sd1i = elev.se, sd2i = amb.se,  :
Processing terminated since k = 0.
In rma(m1i = elev.mean, m2i = amb.mean, sd1i = elev.se, sd2i = amb.se,  :
Studies with NAs omitted from model fitting.

• rma() can also take the estimate and its standard error as arguments. You don't need to use the mean and sd. May 13, 2015 at 17:11
• The standard error of a mean is equal to the standard deviation divided by the square-root of the sample size. So, if you know the standard error and the sample size, it's easy to calculate the SD. May 13, 2015 at 22:32
• What I said is that I do know se, but I do not know sd and n, hence my question May 14, 2015 at 7:08
• @JeremyMiles how can I include SE as an argument considering the structure of my dataset? (see EDIT). Thanks May 14, 2015 at 7:19
• @fede_luppi Ah, okay, it wasn't clear to me whether you knew the n's (in which case it would have been easy to compute the SDs). But for the (log-transformed) ratio of means as the outcome measure, there is a simple solution. I'll provide a proper answer. May 15, 2015 at 9:26

The outcome measure used is the (log-transformed) ratio of means (often called the response ratio in the ecology literature), which is given by $$y = \ln\left[\frac{\bar{x}_1}{\bar{x}_2}\right] = \ln[\bar{x}_1] - \ln[\bar{x}_2].$$ The large-sample approximation to the sampling variance of $y$ is given by $$Var[y] = \frac{SD_1^2}{n_1 \bar{x}_1^2} + \frac{SD_2^2}{n_2 \bar{x}_2^2}$$ (see, for example, Hedges et al., 1999). Since $$SE[\bar{x}_1] = \frac{SD_1}{\sqrt{n_1}} \quad \mbox{and} \quad SE[\bar{x}_2] = \frac{SD_2}{\sqrt{n_2}},$$ it follows that $$Var[y] = \frac{SE_1^2}{\bar{x}_1^2} + \frac{SE_2^2}{\bar{x}_2^2}.$$ So, you could easily compute this by hand based on the information you have.

But there is an even simpler trick. All that you have to do is feed the SEs to the escalc() or rma() functions and at the same time set the sample sizes to 1. An example:

library(metafor)
escalc(measure="ROM", m1i=15.6, m2i=12.2, sd1i=3.82, sd2i=3.22, n1i=15, n2i=20, digits=6)
escalc(measure="ROM", m1i=15.6, m2i=12.2, sd1i=3.82/sqrt(15), sd2i=3.22/sqrt(20), n1i=1, n2i=1, digits=6)


Both give you:

          yi         vi
1 0.24583496 0.00748055


Hedges, L. V., Gurevitch, J., & Curtis, P. S. (1999). The meta-analysis of response ratios in experimental ecology. Ecology, 80(4), 1150-1156.

• Dear Wolfgang, thanks for your through answer. I would like to share a further though with you: Is it OK for a paper if I weight each experiment based on the number of years each experiment was carried out? I can found #years in the literature. In that case, could I calculate SD as SE/sqr(#years)? The next step would be to perform the meta-analysis for each Mic * N level so I would have 4 groups: AM-LowN, AM-HighN, ECM-LowN, ECM-HighN, but to be honest I am not sure how I should structure the dataset. Thanks and sorry for my lack of skills. May 15, 2015 at 11:04
• The reason is that the longer the experiment, the more important its results should be within the meta-analysis May 15, 2015 at 11:19
• This seems to be a separate question/issue. Somewhat related, but still different. I would suggest to ask a new question. May 15, 2015 at 22:17