# How can I calculate the weight of a study for meta-analysis?

I'm tasked with producing a forest plot for a meta-analysis but I've only been given the risk ratio, sample size and confidence intervals of the necessary studies.

I think that I have to find the SE by dividing the difference in the CIs by 3.92. Then I have to multiply this by the square root of the sample size to calculate the SD for each study. Then I have to square this value to get the variance. I can then do 1/variance to determine the weight each study should have in my meta analysis.

Have I got this right?

Right-ish. You've described a fixed-effects regression.

Generally a random effects regression is more appropriate. You estimate this using software - there are lots of options, but my favorite is the metafor package in R (which has the advantage of being free as well).

Note that for this kind of weighting for a measure like the relative risk (i.e. you already have the estimates and their confidence intervals), the variance is simply defined as the standard error squared.

This is usually done after transforming onto the log-scale for ratio-type measures (another slight difference from your proposal, where the method you gave is better suited for continuous estimates like mean differences).

There is no additional step needed to account for the sample size after back-estimating the standard error. This is because the sample size is already accounted for in the calculation of CI for the relative-risk measure (whether an unadjusted RR, or some form of adjusted estimate).

This is covered in the Cochrane handbook at https://training.cochrane.org/handbook/current/chapter-06#section-6-3 (back-estimating SEs from the CI) with some slightly opaque discussion on weights at https://training.cochrane.org/handbook/current/chapter-10#section-10-3.

In short, working on the log scale (natural logs) $$logRR = ln(RR)$$ $$SE_{logRR} = \frac{ln(CI_{upper}) - ln(CI_{lower})}{3.92}$$ and the inverse variance weight (for a fixed-effects analysis) for this study would then be $$invvar = \frac{1}{SE_{logRR}}$$

It is useful to note as per Jeremy's answer that most software implementations (e.g. meta or metafor in R, but also in commercial software like Stata) should happily take the original ratio estimate with CI as inputs , and then back-calculate the standard error for that effect on your behalf (including working on the log-scale as appropriate). This contributes to both calculating the calculating the inverse-variance weights and calculating the pooled estimate across studies.