Method document
Sample size to estimate a risk ratio per standard deviation
How many participants are needed to estimate how much the risk or prevalence of a binary outcome changes per standard deviation of a numerical predictor, from modified Poisson regression with robust standard errors, within a chosen factor. Allows for other covariates. Covers non-response.
https://statwisely.com/methods/precision-rr-per-sd/
When to use it
- A cohort or cross-sectional study reporting the risk or prevalence ratio for a measured predictor, such as age or a biomarker, when the ratio with its interval is the aim.
Not for
- A common outcome with a strong effect, where the risk would pass 1 for participants far above the mean; a log-linear risk model does not fit, and the calculator refuses it.
- An odds ratio. Use the odds ratio per SD.
Notation
- Number of participants
- Risk of the outcome at the predictor’s mean
- Precision factor: the interval runs from RR / f to RR × f
- Share of the predictor’s variance explained by the other covariates
- Per-participant robust variance of the log risk ratio per SD
- Standard normal quantile for confidence 1 − α (1.960 for 95%)
- Non-response rate
Formulas
Small effects: a closed form
With a binary outcome analysed by Poisson regression and robust errors, the slope of a standard-normal predictor has variance (1 − p)/p per participant when the effect is small [1].
At an expected risk ratio
Given the expected risk ratio, the sandwich variance of the modified-Poisson slope is integrated over the predictor by Gauss–Hermite quadrature, with z = (1, x). A rising risk means more events, so the plan can be smaller than the closed form.
Non-response
The number to approach so that n respond. Applied last, after any clustering.
Parameters
Confidence level
Values: 90%, 95% or 99%
95% is the convention in health research. A higher level widens the interval, so the same margin needs a larger sample.
Precision factor
Values: Above 1
1.25 means the interval runs from RR / 1.25 to RR × 1.25.
Risk at the predictor’s mean
Values: Between 0 and 1
A rare outcome needs many more participants: the variance grows as (1 − p)/p.
Expected risk ratio per SDOptional
Values: Above 0; empty for a small effect
Sent to the engine under the shared name odds_ratio.
R² of the predictor on the other covariatesOptional
Values: At least 0 and below 1
0 with no other covariates.
Expected non-response rateOptional
Values: 0% up to, but not including, 100%
The share of people approached who will not take part; use the response rate of a comparable study. Approaching more people restores the number of respondents, not their representativeness: if non-responders differ, the estimate can still be biased.
Assumptions
- Participants are independent, the predictor is approximately normal, and the log risk changes linearly with it.
- Non-response is unrelated to the outcome.
Worked examples
A 10% risk, small effect
A risk of 0.1 at the mean, factor 1.25: 3.8415 × 9 / (ln 1.25)² = 694.2, so n = 695.
Sample size: 695
Open this example in the calculatorPlanning at the expected effect
Expecting a risk ratio of 1.5 per SD, more events occur among those above the mean: n = 605.
Sample size: 605
Open this example in the calculatorA more common outcome
A risk of 0.3: (1 − p)/p falls from 9 to 2.33, so n = 181.
Sample size: 181
Open this example in the calculatorValidation
- Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
- At no effect the quadrature reproduces (1 − p)/p exactly. In R, Poisson glm fits with sandwich::vcovHC standard errors on simulated samples at the planned sizes gave median interval factors of 1.246 to 1.248 against a target of 1.25, both at no effect and at expected risk ratios of 1.3 and 1.5. An independent R integration of the sandwich variance reproduces the engine’s sizes.
How to cite
StatWisely. Sample size to estimate a risk ratio per standard deviation. Method document, engine version 1.0.0, reviewed 2026-10-04. https://statwisely.com/methods/precision-rr-per-sd/
Cite the original references for the formulas your design uses as well.
References
- 1.Zou G. A modified Poisson regression approach to prospective studies with binary data. American Journal of Epidemiology. 2004;159(7):702–706. doi:10.1093/aje/kwh090