Ask Mallard

Multivariable analysis — guided

§4.1
Rev 4.7 · reviewed Sep 2026
Multivariable analysis — guided
Regression, survival models, and ANOVA are deliberately not point-and-click here. The failure mode isn't arithmetic — it's specification: which covariates, which model, which assumptions.
Source formula: Peduzzi P, et al. J Clin Epidemiol 1996;49:1373–9 (simulation study of events per variable). Riley RD, et al. BMJ 2020;368:m441. doi:10.1136/bmj.m441 (prediction-model sample size). van Smeden M, et al. Stat Methods Med Res 2019;28:2455–74. doi:10.1177/0962280218784726 (beyond events per variable).
Table. Choosing a model by outcome type
OutcomeTypical modelReports
Binary (yes/no)Logistic regressionOdds ratios
ContinuousLinear regressionMean differences
Time-to-eventCox proportional hazardsHazard ratios
Counts / ratesPoisson or negative binomialRate ratios
* A fixed events-per-variable rule does not guarantee stable estimates or prevent overfitting. Count candidate parameters, including categorical levels, nonlinear terms and interactions. Riley RD, et al. BMJ 2020;368:m441. doi:10.1136/bmj.m441 (prediction-model sample size).
Mallard's role here is to build you a defensible plan: the model, the covariate rationale, a draft methods paragraph, and the questions to bring to your statistical consult — then hand you R code that matches.
Plan sample size for the intended model
A fixed number of events or observations per predictor is not a sufficient sizing plan. For prediction, consider candidate parameter count, outcome frequency or variability, anticipated model performance and the desired control of overfitting. For an explanatory model, plan precision or power for the target contrast under its actual design. Clustering, missingness and validation requirements need separate allowance.
Understand what this is measuring