NNT/NNH Calculator & Log-rank to Hazard Ratio
Source:vignettes/nnt-logrank-hr.Rmd
nnt-logrank-hr.RmdOverview
Systematic reviews frequently encounter trials that report incomplete survival data – a log-rank p-value but no Hazard Ratio, or probabilities without a directly computed NNT. ParCC bridges these gaps with two tools in the HR Converter module.
Tutorial A: Extracting a Hazard Ratio from a Log-rank Test
The Scenario – Adjuvant Chemotherapy in Colon Cancer
An older trial (published 2005) reports:
- Log-rank chi-squared = 6.8
- Total events (deaths) across both arms = 142
- The treatment arm had better outcomes
The paper does not report a Hazard Ratio, which you need for your meta-analysis.
The Peto Approximation
When only summary log-rank statistics are available, the Peto method estimates:
with a 95% confidence interval:
where is the total number of events.
Tutorial B: Computing NNT for a Formulary Decision
The Scenario – Hospital P&T Committee
A Pharmacy & Therapeutics committee asks: “How many patients must we treat with Drug X to prevent one additional death?” The trial reports:
- 12-month mortality: Control = 18%, Intervention = 12%
In ParCC
- Navigate to Convert > HR -> Probability & NNT > NNT/NNH tab.
- Select input mode: Two Probabilities.
- Enter Control = 0.18, Intervention = 0.12.
- Result: ARR = 6.0%, NNT = 17.
Interpretation: For every 17 patients treated with Drug X for 12 months, one additional death is prevented.
Other Input Modes
ParCC supports four ways to compute NNT:
| Input Mode | You provide | ParCC calculates |
|---|---|---|
| Direct ARR | Absolute risk reduction | NNT = ceil(1/ARR) |
| Two Probabilities | Control & intervention probabilities | ARR, then NNT |
| RR + Baseline | Relative Risk + control probability | ARR = p0 x (1 - RR), then NNT |
| OR + Baseline | Odds Ratio + control probability | Converts to probabilities via Zhang & Yu, then NNT |
When to Use These Tools
- Log-rank -> HR: Systematic reviews where older trials lack HR estimates; indirect treatment comparisons needing HR inputs from published statistics.
- NNT Calculator: Communicating treatment effects to clinicians and formulary committees; sensitivity analyses varying NNT across plausible baseline risk ranges.
References
- Tierney JF, Stewart LA, Ghersi D, Burdett S, Sydes MR. Practical methods for incorporating summary time-to-event data into meta-analysis. Trials. 2007;8:16.
- Parmar MKB, Torri V, Stewart L. Extracting summary statistics to perform meta-analyses of the published literature for survival endpoints. Statistics in Medicine. 1998;17(24):2815-2834.
- Altman DG, Andersen PK. Calculating the number needed to treat for trials where the outcome is time to an event. BMJ. 1999;319(7223):1492-1495.