Skip to main content

    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.

    Engine version 1.0.0 · Reviewed 3 October 2026

    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

    n1n_1
    Group 1 size; group 2 has r n₁.
    λ1,λ2\lambda_1, \lambda_2
    Event rates per unit of time in groups 1 and 2.
    tt
    Follow-up time per participant, in the rates’ unit.
    rr
    Allocation ratio n₂/n₁.
    kk
    Negative-binomial dispersion: Var = μ + kμ².

    Formulas

    Standardized log rate ratio

    z=∣ln⁡(λ1/λ2)∣n1[1/λ1+1/(rλ2)]/t+(1+1/r) kz=\frac{|\ln(\lambda_1/\lambda_2)|\sqrt{n_1}}{\sqrt{[1/\lambda_1+1/(r\lambda_2)]/t+(1+1/r)\,k}}

    The dispersion adds a variance term that does not fall as follow-up lengthens [1].

    Power from the normal rejection region

    Power=Φ(z−z1−α/tails)+Itails=2Φ(−z−z1−α/tails)\text{Power}=\Phi(z-z_{1-\alpha/\text{tails}})+I_{\text{tails}=2}\Phi(-z-z_{1-\alpha/\text{tails}})

    z₁₋α/tails is the standard-normal critical value.

    Parameters

    Group 1 sizen1n_1

    Values: Integer, at least 2

    Participants available in group 1; group 2 follows from the allocation ratio.

    Allocation ratiorrOptional

    Values: Positive; 1 for equal groups

    Group 2 has n₂ = ⌈r n₁⌉ participants.

    Rate in group 1λ1\lambda_1

    Values: Positive

    Expected events per unit of time.

    Rate in group 2λ2\lambda_2

    Values: Positive, not equal to λ₁

    Expected events per unit of time in the comparator.

    Follow-up per participanttt

    Values: Positive

    In the same time unit as the rates; doubling it buys about as much as doubling the participants.

    Dispersion (k)kk

    Values: Positive

    From a negative-binomial fit to earlier data; Var = μ + kμ².

    Significance levelα\alpha

    Values: Between 0 and 1

    The type I error rate for the specified test.

    Test directionss

    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 calculator

    Validation

    • 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. 1.Zhu H, Lakkis H. Sample size calculation for comparing two negative binomial rates. Statistics in Medicine. 2014;33(3):376–387.