Statistical Calculators › Counts and Rates › Negative Binomial Regression Sample Size
← All Calculators

Counts and Rates

Negative Binomial Regression Sample Size

Sample size for comparing two negative binomial event rates when count outcomes are overdispersed. Uses the negative binomial regression framework of Zhu and Lakkis (2014), with the maximum-likelihood estimate of the null variance. Runs entirely in your browser.

Study Design

Enter the expected event rate, treatment rate ratio, exposure time, and negative binomial dispersion.
Model: log(μi) = log(ti) + β0 + β1xi; RR = exp(β1).

Required Sample Size

Computed using the Zhu–Lakkis negative binomial regression approximation with maximum-likelihood null variance.
Enter the design assumptions and click Calculate Sample Size.

Methodology

Negative binomial regression is useful for count outcomes whose variance exceeds the mean. this method describes the model with a negative binomial dispersion parameter κ and uses a log-link regression model in which the treatment coefficient represents the log of the event-rate ratio.

This calculator implements the two-group sample-size calculation described by Zhu and Lakkis (2014) and reproduced in the this method procedure Tests for the Ratio of Two Negative Binomial Rates. The calculation is for a Wald or likelihood-ratio test of the treatment regression coefficient.

Negative Binomial Regression Model

log(μij) = log(tij) + β0 + β1xij

RR = λ2 / λ1 = exp(β1)

Here, λ1 is the control event rate, λ2 is the treatment event rate, and RR = λ2/λ1. The average exposure time is denoted by μt. The allocation ratio is R = N2/N1.

Variance Components

The alternative variance component used by Zhu and Lakkis is VA:

VA = [1 / μt] [1 / λ1 + 1 / (Rλ2)] + [(1 + R)κ / R]

For the maximum-likelihood estimate of the null variance, the corresponding component is:

V0 = (1 + R)2 / [μt R(λ1 + Rλ2)] + [(1 + R)κ / R]

Sample Size Formula

For a two-sided test, the required number of subjects in Group 1 is:

N1 ≥ [ z1−α/2√V0 + z1−β√VA ]2> / [log(RR)]2

For a one-sided test, z1−α/2 is replaced by z1−α. Group 2 is then obtained from N2 = R N1. The displayed group sample sizes are rounded upward to whole subjects.

Dispersion and Overdispersion

The negative binomial dispersion parameter is κ. Under the parameterization used by this method, κ is the additional variance component beyond the Poisson mean-variance relationship. Larger κ values increase the variance component used in the sample-size calculation and therefore generally increase the required sample size.

Worked Validation Example

this method provides a validation example based on Zhu and Lakkis (2014). The design is two-sided with 80% power and α = 0.05, equal allocation, average exposure time 0.75 years, control event rate 0.8 events per patient-year, treatment rate ratio 0.85, and κ = 0.4.

Power = 0.80
Alpha = 0.05
Exposure = 0.75
λ1 = 0.80
RR = 0.85
κ = 0.40
N2/N1 = 1

Expected result: N1 = 1,311; N2 = 1,311; total N = 2,622.

The implementation reproduces the this method validation result: 1,311 subjects per group, with calculated power approximately 0.800.

Interpretation

Important Approximation

Note that these asymptotic Wald and likelihood-ratio calculations are most appropriate when the sample size exceeds approximately 50 subjects per group. When the resulting sample size is smaller, the calculation should be regarded as a rough planning estimate rather than a substitute for simulation or small-sample methods.

References

Zhu, H., & Lakkis, H. (2014). Sample size calculation for comparing two negative binomial rates. Statistics in Medicine, 33(3), 376–387. doi:10.1002/sim.5947.
Publisher / article record

the software / this method. Tests for the Ratio of Two Negative Binomial Rates, Chapter 438. the relevant methodological literature describes the negative binomial regression model, variance calculations, sample-size formula, and validation against Zhu and Lakkis (2014).
this method procedure documentation

Clinical Trials

Real trials behind this calculation

See the analysis this calculator plans for applied to published trial results, with the estimates, confidence intervals and interpretation explained.

DYNAGITO
Independent statistical analysis of DYNAGITO (NCT02296138), a phase 3 trial of tiotropium/olodaterol 5/5 µg versus tiotropium 5 µg for moderate to severe…
Phase 3 · n = 7,903
DEVOTE
Independent statistical analysis of DEVOTE (NCT01959529), the double-blind cardiovascular outcomes trial of insulin degludec versus insulin glargine in 7637 people with type…
Phase 3 · n = 7,637
EMPACT-MI
Independent statistical analysis of EMPACT-MI, the randomized, placebo-controlled phase 3 trial of empagliflozin 10 mg after myocardial infarction: covariate-adjusted Cox hazard ratio…
Phase 3 · n = 6,522
CARES
Independent statistical analysis of Community Collaboration to Advance Racial/Ethnic Equity in CRC Screening: primary endpoint results, effect estimate with confidence interval, sample-size…
Phase NA · n = 5,127
SYGMA2
Complete statistical analysis of SYGMA2, a randomized phase 3 trial evaluating as-needed budesonide/formoterol versus twice-daily budesonide with as-needed terbutaline in adults and…
Phase 3 · n = 4,215
(DECIDE)
Complete statistical analysis of the phase 3 DECIDE trial comparing BIIB019 (daclizumab high yield process) with interferon beta-1a in participants with relapsing-remitting…
Phase 3 · n = 1,841
See all 226 trials using negative binomial regression →
Clinical Biostats