Log hazard ratio and SE from whatever the paper prints
Paste one row per study. Fill in what the paper prints and leave the rest blank.
A meta-analysis needs each study's log hazard ratio and its standard error. From a 95% CI, SE = [ln(upper) − ln(lower)] / 3.92. From a two-sided p, z = Φ−1(1 − p/2) and SE = |ln HR| / z. From O−E and V, ln HR = (O−E) / V and SE = 1 / √V (Tierney 2007).
What a row can hold
| The paper prints | Fill in | How it is used |
|---|---|---|
| O−E and V | oe, v | ln HR = (O−E) / V, SE = 1 / √V |
| HR and CI | hr, lower, upper | SE = [ln(upper) − ln(lower)] / (2 × 1.96) |
| HR and p | hr, p | z = Φ−1(1 − p/2), SE = |ln HR| / z |
| Log-rank p and events | p, events, ratio, favours | V = events × r / (1 + r)², O−E = ± z√V, ln HR = (O−E) / V, SE = 1 / √V |
| HR and events | hr, events, ratio | V as above, SE = 1 / √V |
A row with several of these uses the highest and checks the rest against it. ratio is treatment:control, as 2:1 or the numbers analysed, 491:485 (default 1:1). favours is treatment (HR below 1) or control. level sets a CI other than 95%, and sided = 1 marks a one-sided p. hr also takes 0.70 (0.55–0.89), and whole lines work too: Trial A: HR 0.70 (95% CI 0.55 to 0.89), p = 0.003. Decimal commas work with semicolons or tabs.
Checked in R 4.5.1: each route against its formula; HR + CI and HR + p against metafor::conv.wald and meta::metagen; coxph and survdiff output on four of R's survival datasets; the worked example in Tierney 2007. The metafor code was run as printed, on metafor 4.8.0. Sources: Tierney et al. 2007, updated 2025; Parmar et al. 1998; Cochrane Handbook, section 6.8.
FAQ
How do I get the standard error of a log hazard ratio from a confidence interval?
Take the natural log of both limits, subtract, and divide by 2 × 1.96 for a 95% CI. For HR 0.70 (0.55–0.89), the log HR is −0.357 and the SE is (ln 0.89 − ln 0.55) / 3.92 = 0.123. For a 90% CI divide by 2 × 1.645, and for a 99% CI by 2 × 2.576.
What is the two-sided trap?
z comes from half of a two-sided p: z = Φ⁻¹(1 − p/2). For p = 0.05 that is 1.96. Forgetting to halve gives 1.64, and an SE 19% too large. A one-sided p is used as it stands, so mark it with sided = 1. Some trials print one-sided p-values, so check the paper's methods. When a row also has a CI, the calculator flags a p that fits it only as one-sided.
What if the paper only says p < 0.001, or NS?
A limit such as p < 0.001 is used as if it were the p-value, the conservative approach in the Cochrane Handbook and in metafor, and the row is flagged because the SE is then an upper limit. NS or p > 0.05 gives no usable z, so the row needs a CI or events.
Why does a row with only a p-value need favours?
A p-value has no direction, and the log HR needs a sign. favours = treatment means an HR below 1. If a result is not significant, Tierney et al. suggest looking at how the curves separate or what the text says.
What is the difference between V and the variance of the log HR?
V is the variance of the log-rank statistic, and the variance of the log HR is 1 / V. So SE² is the variance of the log HR here, and 1 / SE² is V.
How close are the log-rank routes to a Cox model?
Close near 1 and further away beyond it. In our simulation of 300 patients per arm, O−E / V averaged within 1% of the Cox HR from HR 0.7 to 1.5. When most patients had events it averaged 5% or more away by HR 0.3 and HR 2.5, so rows below HR 0.4 or above HR 2.5 carry a note. Prefer a printed CI when the paper has one.
Can I put the CSV straight into RevMan?
A generic inverse variance analysis takes the log HR and its SE, which are the first two number columns, so enter those in the outcome's table. RevMan's own CSV import needs its templates, and we have not tested this file against it.
Have a KM figure from a paper? Get its data in a minute.
Upload a figure