Method document
Achieved power for a negative-binomial rate ratio
Calculates the power of a rate-ratio test for over-dispersed counts modelled as negative binomial, from the rates, follow-up, dispersion, and group sizes.
https://statwisely.com/methods/power-negative-binomial/
When to use it
- Assess a rate comparison in which participants differ in their underlying rate, so the extra variance grows with the mean.
Not for
- Longer follow-up helps less than under Poisson: the dispersion term does not shrink with time.
Notation
- Group 1 size; group 2 has r n₁.
- Event rates per unit of time in groups 1 and 2.
- Follow-up time per participant, in the rates’ unit.
- Allocation ratio n₂/n₁.
- Negative-binomial dispersion: Var = μ + kμ².
Formulas
Standardized log rate ratio
The dispersion adds a variance term that does not fall as follow-up lengthens [1].
Power from the normal rejection region
z₁₋α/tails is the standard-normal critical value.
Parameters
Group 1 size
Values: Integer, at least 2
Participants available in group 1; group 2 follows from the allocation ratio.
Allocation ratioOptional
Values: Positive; 1 for equal groups
Group 2 has n₂ = ⌈r n₁⌉ participants.
Rate in group 1
Values: Positive
Expected events per unit of time.
Rate in group 2
Values: Positive, not equal to λ₁
Expected events per unit of time in the comparator.
Follow-up per participant
Values: Positive
In the same time unit as the rates; doubling it buys about as much as doubling the participants.
Dispersion (k)
Values: Positive
From a negative-binomial fit to earlier data; Var = μ + kμ².
Significance level
Values: Between 0 and 1
The type I error rate for the specified test.
Test direction
Values: 1 or 2
One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Assumptions
- Counts follow a negative-binomial distribution with the same dispersion in both groups.
- One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Worked examples
A worked input set
With 80 per group followed for 2 years, rates of 0.8 and 1.2 per year, and k = 0.5 at α = 0.05: the variance per participant is (1.25 + 0.83)/2 + 2 × 0.5 = 2.04.
Needed for analysis: 80 · To approach: 160
Open this example in the calculatorValidation
- At the size the negative-binomial calculator returns, this power reaches that calculator’s target, and one fewer falls short; it is checked against an independent calculation in R.
How to cite
StatWisely. Achieved power for a negative-binomial rate ratio. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-negative-binomial/
Cite the original references for the formulas your design uses as well.
References
- 1.Zhu H, Lakkis H. Sample size calculation for comparing two negative binomial rates. Statistics in Medicine. 2014;33(3):376–387.