Skip to content
Omnikalc

Events per variable calculator

Enter the sample size, the number of events and the number of candidate predictors to get the events per variable, the largest number of predictors the data can support and the sample size needed for the model you want.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Results

Events per variable

7.50

Below the usual rule of 10
Most predictors the data can support
6
Events needed for your predictors
80
Sample size needed at the same event rate
400
Event rate
20.0 %
Events missing (0 if enough)
20

The events per variable calculator tells you whether your data can support a regression model: the events per variable, the maximum number of predictors and the sample needed for the model you want.

How the calculation works

  • Enter the sample size and the number of events of the rarer outcome.
  • Enter the number of candidate predictor parameters and choose the target.
  • The calculator gives the events per variable, the maximum predictors, the events and sample needed and the shortfall.

Example

A study has 300 patients and 60 events, and you want to test 8 candidate predictors. The events per variable are 60 / 8 = 7.50, below the usual rule of 10. At 10 events per variable, the data support 6 predictors. For 8 predictors you need 80 events, which is 400 patients at the same event rate of 20.0 %.

Why it matters

The calculator helps medical researchers who build prediction models, students of epidemiology and data scientists who work with imbalanced outcomes.

Good to know

The rule is about overfitting: with too few events, the model fits noise, and its performance in new patients is worse than in the data used to build it. Techniques such as penalized regression and shrinkage help but do not remove the problem. Reduce the number of candidates using knowledge of the subject rather than the data, for example by combining related variables or by dropping those with little evidence. For a continuous predictor modeled with a spline, count each term. For a linear regression with a continuous outcome, the guideline is milder, at about 10 to 20 observations per predictor. Report the number of events and of candidate parameters in your methods.

The logistic regression calculator gives probabilities from coefficients, the linear regression calculator fits lines, the sample size calculator sizes surveys and the R-squared calculator measures fit.

Frequently asked questions

What are events per variable?

It is the number of events of the rarer outcome divided by the number of candidate predictor parameters in a regression, especially a logistic or Cox model. The usual rule of thumb asks for at least 10 events per variable.

Why is the rarer outcome what counts?

The information in a binary outcome is limited by the smaller group. A study with 1,000 people but only 20 events carries the information of a small study.

Is the rule of 10 enough?

It is a rough guide. Newer approaches size the model from the expected fit and shrinkage, and they often need more. Count every parameter, including each dummy variable of a categorical predictor, and count all candidates, not only those kept in the final model.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.