03 · What You Need to Know
What Determines the Sample Size Needed for Regression?
First, What Is the Regression Model Intended to Do?
Regression is a family of statistical methods for representing relationships between an outcome and one or more explanatory variables or predictors.
Researchers use regression for different inferential purposes. An explanatory study may seek to estimate an association, assess a theoretical relationship, or evaluate an intervention effect after adjustment. A prediction study may instead aim to estimate outcomes accurately for new individuals.
These objectives overlap statistically but are not interchangeable.
For example, a coefficient may be estimated precisely enough to investigate an association while the overall model remains unsuitable for predicting individual outcomes. Conversely, a model may predict reasonably well without identifying causal relationships.
Sample-size planning should therefore begin by defining the primary estimand or predictive objective.
Does the Type of Regression Matter?
Yes. Different regression models use different outcome distributions, likelihood functions, variance assumptions, and measures of information.
| Regression model |
Typical outcome |
Important planning considerations |
| Multiple linear regression |
Continuous numerical outcome |
Residual variability, predictor relationships, coefficient precision, model complexity. |
| Logistic regression |
Binary outcome |
Events, nonevents, predictor complexity, separation, coefficient precision. |
| Poisson or negative binomial regression |
Counts or event rates |
Event frequency, exposure, dispersion, predictor distribution. |
| Cox proportional hazards regression |
Time-to-event outcome |
Observed events, censoring, follow-up, predictor complexity. |
| Multilevel regression |
Outcomes nested within clusters |
Number of clusters, cluster sizes, intracluster dependence, random-effects structure. |
A sample of 200 observations may provide adequate information for a simple continuous-outcome model but be insufficient for a binary-outcome model with very few events or a multilevel model involving only a handful of clusters.
Why Does the Number of Predictors Affect Sample Size?
Each estimated regression parameter uses information from the data. Adding predictors generally increases model complexity and can increase the risk that the model fits random variation rather than stable relationships.
However, the number of named variables is not always the number of estimated parameters.
A categorical predictor with four levels commonly requires three indicator coefficients when one level serves as the reference. A nonlinear effect represented by several spline terms may require multiple coefficients. Interaction terms introduce additional parameters.
Consequently, a model with five named predictors may involve considerably more than five regression coefficients.
For planning, researchers should consider the number of candidate predictor parameters, including nonlinear terms and interactions, rather than simply count questionnaire variables.
What Is the Difference Between Sample Size and Information?
Total sample size is an important measure of available data, but it does not fully describe the information relevant to every regression parameter.
In linear regression, coefficient precision depends on residual variance and the variation in predictors after accounting for their relationships with other predictors.
In logistic regression, the distribution of outcome events and nonevents matters. Rare outcomes may provide limited information even when the dataset contains thousands of observations.
In clustered data, multiple observations from the same group may contribute less independent information than the same number of observations sampled independently.
Thus, a larger dataset is not automatically sufficient for a more complex model.
How Does Multicollinearity Affect Sample-Size Requirements?
Multicollinearity occurs when predictors are strongly linearly related to one another.
When a predictor can be largely explained by other predictors, it becomes harder to estimate its unique association with the outcome precisely.
For ordinary least squares regression, the variance of a coefficient depends partly on the variation in that predictor remaining after adjustment for the others.
A simplified expression is:
The expression assumes the conventional homoscedastic linear model with a full-rank design matrix. It is not a universal sample-size formula.
Collecting more observations may improve precision, but it does not necessarily resolve severe structural redundancy among predictors.
How Should Sample Size Be Planned for Explanatory Linear Regression?
For explanatory regression, researchers should identify the primary hypothesis or coefficient before calculating sample size.
If the objective is to test whether a particular predictor contributes to explaining an outcome after adjustment, a power calculation for the corresponding coefficient or incremental explained variance may be appropriate.
If the objective is to estimate that coefficient accurately, a precision-based calculation may better match the research question.
For a block of predictors, the relevant effect may be the increase in explained variance attributable to the block after accounting for other predictors.
A common standardized effect for an F test is:
Power calculations must also specify the number of tested parameters, the number of parameters in the full model, the significance level, and the desired power.
Researchers should not substitute an arbitrary conventional effect size without considering the theoretical or practical magnitude of the relationship being tested.
Why Is Precision Sometimes More Important Than Power?
Some regression studies aim to quantify a relationship rather than merely reject the hypothesis that a coefficient equals zero.
For example, a researcher may want to estimate how much examination performance changes, on average, with an additional hour of study after adjustment for prior achievement.
A statistically significant coefficient may still have a confidence interval spanning effects with substantially different practical implications.
Kelley and Maxwell (2003) discuss sample-size planning for multiple regression with an emphasis on obtaining accurate coefficient estimates rather than focusing exclusively on statistical significance.
The choice between precision-based and power-based planning should therefore reflect the intended inferential objective.
How Does Sample Size Differ for Logistic Regression?
Logistic regression models the relationship between predictors and the probability of a binary outcome, commonly through the logit link.
Its sample-size requirements depend not only on the total number of observations but also on the number and distribution of events and nonevents.
For example, a dataset of 1,000 students with only 20 dropout events may provide limited information for a complex dropout model despite its substantial total size.
Low event counts can contribute to unstable coefficient estimates, wide confidence intervals, and complete or quasi-complete separation.
However, there is no universal event count that guarantees reliable logistic regression. Predictor distributions, effect magnitudes, model complexity, and estimation methods all matter.
The number of events needed for logistic regression should be evaluated according to the model's purpose and intended analysis.
What Is the Events-per-Variable Rule?
Events per variable, commonly abbreviated EPV, is a ratio used in discussions of regression models with binary or time-to-event outcomes.
In a simplified form, EPV divides the number of outcome events by the number of predictor parameters being considered.
A historically influential recommendation suggested approximately ten events per predictor variable in certain logistic and survival regression settings.
However, subsequent methodological research has shown that a fixed EPV threshold does not adequately capture the complexity of regression sample-size requirements.
Vittinghoff and McCulloch (2007) examined the circumstances under which fewer than ten events per variable may be acceptable. Van Smeden and colleagues (2019) further demonstrated limitations of simple EPV-based approaches.
The question of whether ten events per variable is sufficient should therefore be treated as a methodological question rather than a universal rule.
Why Is Prediction Model Development Different?
A prediction model is intended to generate predictions for new observations. Its performance must therefore be assessed beyond how well it fits the development dataset.
Model development may involve predictor selection, nonlinear transformations, interactions, shrinkage, and tuning decisions that increase effective complexity.
With insufficient data, a model may overfit random variation and show overly optimistic apparent performance.
Riley and colleagues (2019) propose sample-size criteria for developing prediction models that consider expected model performance, shrinkage, and precision of important quantities rather than relying solely on a fixed number of observations per predictor.
The sample size required for prediction model development should therefore be evaluated separately from that required to test a single explanatory coefficient.
How Does Overfitting Affect Regression Models?
Overfitting occurs when a model captures random patterns specific to the development data rather than relationships that generalize well to new observations.
It can arise when model complexity is excessive relative to the available information.
Overfitting may lead to unstable coefficients, exaggerated apparent associations, and optimistic predictive performance.
Penalization, shrinkage, and careful internal validation can reduce some consequences, but they do not eliminate the need for adequate data.
Researchers should also avoid selecting predictors solely because they achieve statistical significance in a small dataset. Data-driven selection can increase instability and invalidate naive confidence intervals.
Can You Calculate Sample Size From the Number of Predictors Alone?
Not reliably. The number of predictors is one component of model complexity, but it does not determine the effect sizes, outcome variability, event frequency, or relationships among predictors.
Two models with the same number of coefficients can have very different information requirements.
For example, a linear regression with five weakly correlated predictors and a continuous outcome may be more stable than a logistic regression with five highly correlated predictors and a rare outcome.
Rules such as N = 50 + 8m or ten observations per predictor have appeared in methodological discussions, but they should not be treated as universally valid sample-size formulas.
Green (1991) examined commonly used rules for multiple regression and emphasized the role of effect size and statistical power.
What If the Regression Model Includes Interactions or Nonlinear Terms?
Interactions and nonlinear terms increase model complexity and may require additional information.
For example, a continuous predictor modeled using a restricted cubic spline with several degrees of freedom uses more parameters than a single linear term.
An interaction between two categorical predictors may require multiple interaction coefficients.
These terms should be included in the candidate parameter count when planning the model.
Researchers should avoid assuming that the number of named variables equals the number of estimated parameters.
How Do Missing Data Affect Regression Sample Size?
Missing outcome or predictor values can reduce the effective information available for analysis.
Complete-case analysis may exclude participants with incomplete records, potentially reducing precision and introducing bias when missingness is systematic.
Multiple imputation or other appropriate methods may retain information under specified assumptions, but they do not create information equivalent to fully observed data.
Recruitment targets should account for anticipated missingness, while the analysis plan should address the assumptions and potential bias associated with missing data.
Should You Use Simulation for Regression Sample-Size Planning?
Simulation can be useful when analytical power or precision formulas do not adequately represent the planned regression model.
Researchers can specify plausible data-generating models, simulate datasets at candidate sample sizes, fit the intended regression model, and evaluate performance across repeated simulations.
Relevant performance measures may include coefficient bias, confidence-interval coverage, estimation precision, convergence, power, or predictive performance.
However, simulation is only as credible as its assumed data-generating processes. It does not remove the need to justify predictor distributions, effect sizes, outcome variability, and other inputs.
Where these parameters are uncertain, a sample-size sensitivity analysis should examine plausible alternatives.