Meta-analysis of trials given hazard ratios I'm trying to do a meta-analysis in R (using metafor) of trials where the outcomes are hazard ratios and I'm given the 95% CI for them and/or the standard error and n.
So if I have columns like:
Trial name      HR      SE     n

I've looked at http://www.inside-r.org/packages/cran/metafor/docs/dat.pignon2000 
It seems what I want is
1) The log of the hazard ratio (easy)
2) The variances (I figure I can do (SE*sqrt(n))^2 , where SE is even given or worked out from the 95% CI).
So the code is something like:
#Effect sizes == log HR
dat$yi <- with(dat, log(mid_per_unit))

#Variances == (SE*sqrt(n))^2
dat$vi <- with(dat, (SE*sqrt(n))^2)


res <- rma(yi, vi, data=dat, method="FE")

forest(res)

But
1) I'm not sure if this is valid
2) I end up with a Forest plot (I guess) of the log of HR? I guess to find the 'meta-analysed' HR I just do log(the estimate)?
ADDENDUM: Instead of worrying about back-transforming, by far the easiest thing to do is add atransf=exp to the forest() call of the rma object.
 A: Assuming that you have the log hazard ratios (collected in the vector yi) and the standard errors of the log hazard ratios (collected in the vector sei), then you can fit a fixed-effects model to these data with:
res <- rma(yi, sei=sei, data=dat, method="FE")

As with several other outcome measures typically used for meta-analyses (e.g., risk ratios, odds ratios, incidence rate ratios), we do not meta-analyze the hazard ratios directly, but first log-transform them. This has two purposes:


*

*The sampling distribution of the raw hazard ratio is typically very skewed. However, standard meta-analytic models assume that the sampling distribution of the outcome measure is (at least approximately) normal and that assumption is much more appropriate for the log-transformed hazard ratio.

*Raw hazard ratios are not symmetric around 1. So, if one were to average a hazard ratio of 0.5 and 2.0 (which are exact opposites of each other), then we would get 1.25, which makes no sense. However, the log-transformed values are -0.6931 and +0.6931, whose average is 0. After back-transformation (exponentiation), we get 1, and the appropriate conclusion that, on average, the hazard ratio is 1.
Also note that analyses using the Cox proportional hazards model (which is often the source of hazard ratios obtained for a meta-analysis) are done on the log-scale. So, when the standard error is reported together with the hazard ratio, that standard error in all likelihood refers to the log-transformed hazard ratio, not the raw one (in fact, given the skewness of the distribution of the raw hazard ratio, the usefulness of a standard error for the raw hazard ratio, if it were indeed reported, is rather questionable).
Similarly, if a confidence interval is reported, then in all likelihood it was constructed on the log-scale and the bounds were exponentiated afterwards. We can then easily back-calculate the SE of the log hazard ratio. See also this question, which deals exactly with that issue.
The same goes for hazard ratios that are reported in conjunction with the results from the log-rank test. Not surprisingly, as the name of the test implies, the underlying analysis is also done on the log scale. So, a standard error that is computed based on such results again refers to log hazard ratio, not the raw one.
A few additional comments:


*

*The sampling variance of the log hazard ratio is obtained by simply squaring the standard error. So, you could just use rma(yi, sei^2, data=dat, method="FE") or first create vi <- dat$sei^2 and then rma(yi, vi, data=dat, method="FE"). Do not multiply/divide by the sample size or square-root thereof.

*The standard error of the log hazard ratio is not the same as taking the log of the standard error of the raw hazard ratio. One cannot just apply the same transformation to the standard error (or variance). In some cases, one can use the delta method to approximate the standard error (or variance) of some random variable following a transformation.
