← All resources

Model Selection Criteria: How to Choose and Justify a Model

13 min read
Model Selection Criteria: How to Choose and Justify a Model

Model Selection Criteria: How to Choose and Justify a Model

Researcher comparing candidate model diagnostic plots

A model selection criterion is a number that scores each candidate model on how well it fits the data, with a penalty for complexity, so you can compare models on one scale. The most common are AIC, BIC, adjusted R-squared and cross-validated error. None of them picks the right model alone. The defensible choice comes from matching the criterion to your goal (explanation or prediction), fixing the candidate set before you look at outcomes, and documenting every step so a reviewer or supervisor can reproduce it. That last part is where agentic analytics helps: PlotStudio AI plans, runs and records the comparison as reviewable code and output.

Plotstudio
Make Model Comparisons Reproducible
PlotStudio AI plans and runs research analyses, keeping the methods, code, and results available to review.
Visit

TL;DR

  • Information criteria (AIC, BIC) trade goodness of fit against the number of parameters. The lower value is preferred, and values are only comparable across models fitted to the same data.
  • BIC penalizes complexity more heavily than AIC once you have 8 or more observations, so it tends to select smaller models.
  • Use theory and prespecification for explanation. Use penalized regression or cross-validation for prediction.
  • Stepwise selection by p-values inflates significance and is unstable. Treat its output as exploratory.
  • Whatever you choose, record candidates, criteria, validation and code so the decision can be reproduced.

Table of Contents

What model selection criteria actually evaluate

Every criterion answers the same underlying question: will this model hold up beyond the sample that produced it? A model with more parameters always fits the training data at least as well. So raw fit is a poor judge, and criteria add a price for complexity.

There are two broad families:

  • Fit metrics for a single model, such as MSE, RMSE, MAE and R-squared. IBM’s overview notes that R-squared can be inflated by adding features, while adjusted R-squared reflects only features that improve performance.
  • Penalized criteria for comparing models, such as AIC, BIC and Mallows’ Cp, plus out-of-sample error from cross-validation.

The same IBM page describes information criteria as favoring the lowest complexity that adequately handles the dataset. That is Occam’s razor expressed as arithmetic.

AIC and BIC in regression

For linear regression with n observations, sum of squared errors SSE and k predictors plus an intercept, Penn State’s STAT 462 course gives:

  • AIC = n·ln(SSE) − n·ln(n) + 2(k+1)
  • BIC = n·ln(SSE) − n·ln(n) + (k+1)·ln(n)

The only difference is the multiplier on the parameter count: 2 for AIC, ln(n) for BIC. In the general likelihood form, University of Helsinki course notes write AIC as 2k − 2 log L and BIC as k·log(n) − 2 log L, and date AIC to Hirotugu Akaike in the early 1970s and BIC to Gideon Schwarz in 1978.

Because log(n) exceeds 2 once n is 8 or more, BIC penalizes added parameters more than AIC on essentially every real dataset. In practice, BIC picks the more parsimonious model and AIC is more willing to keep marginal predictors.

A worked example

Suppose you model systolic blood pressure in 200 patients. Model A has 3 predictors, Model B adds 4 more. Adding the four predictors lowers n·ln(SSE) by 6.0.

  • AIC change: −6.0 + 2×4 = +2.0, so AIC prefers Model A.
  • BIC change: −6.0 + 4×ln(200) ≈ −6.0 + 21.2 = +15.2, so BIC prefers Model A even more strongly.

Now suppose the drop is 12.0 instead. AIC change is −4.0 (prefers B), BIC change is +9.2 (still prefers A). Same data, different verdicts. That divergence is not a bug. It reflects different goals, covered next. For a fuller treatment of the formula, see our guide to the Akaike information criterion.

Two cautions apply. Differences matter, not absolute values, because AIC gives relative rather than absolute measures of predictive skill. And the asymptotic approximation behind AIC becomes less reliable as sample size shrinks, which matters in small clinical cohorts.

Match the criterion to your goal

Höge, Wöhling and Nowak separate two aims:

  • Consistent selection tries to identify the data-generating process. BIC belongs here.
  • Nonconsistent selection estimates which model best predicts new data. AIC, WAIC and Mallows’ Cp belong here.

A 2023 review of information criteria reports that BIC is consistent in the parametric setting, selecting the well-specified model with probability approaching one as n grows, while AIC is asymptotically efficient in nonparametric settings. In plain terms: if you believe one of your candidates is essentially the true model, BIC’s logic fits. If, as in most applied work, every candidate is an approximation, a prediction-oriented criterion is easier to defend. A 2023 cross-validation review makes this argument for ecology, since the true model is almost certainly not in the candidate set.

Your goal Sensible approach Criterion
Estimate an effect (explanation) Prespecify covariates from theory and a causal diagram Not a search at all; report sensitivity analyses
Identify the true structure among a few theory-driven models Compare a small fixed set BIC, with AIC as a check
Predict new observations Penalized regression or cross-validation AIC, cross-validated RMSE or deviance
Many correlated predictors Ridge, lasso or elastic net Cross-validated error

If your question is really about which test to run rather than which regression to keep, start with our statistical test selection guide. For the Bayesian side of the choice, see Bayesian vs frequentist statistics.

Model selection methods and when each fits

Prespecification

For explanation, the most robust approach is deciding the variables in advance from scientific understanding, causal reasoning and study design, with known confounders kept regardless of p-value. One statistics guide calls it the most robust and least glamorous option. Reviewers rarely object to a model that was fixed in a protocol or analysis plan.

The Warwick APTS notes describe forward selection, backward elimination and stepwise algorithms. A systematic search over all subsets that minimizes AIC is preferable, but not always feasible, and stepwise methods are not guaranteed to find the AIC-optimal model.

The bigger problem is inference. After stepwise selection, the data have been used twice: once to choose variables and again to estimate effects. That yields underestimated standard errors, narrow confidence intervals and inflated significance, and small perturbations of the data can flip which variables enter. Guidance for authors in Critical Care Medicine calls p-value-based selection strongly discouraged in the vast majority of scenarios and notes that TRIPOD guidelines recommend penalized regression instead. If you must use it, label the results exploratory.

Penalized regression

Per the ecology guide in PMC, lasso can shrink coefficients exactly to zero, which performs automated variable selection, while ridge gives very small but nonzero values. Elastic net combines both penalties. The estimates are biased by design, so interpret coefficients with care. The same guide notes that when many covariates are correlated, the best predictive model may include covariates with little real association to the outcome, which makes it a poor basis for inference.

Lasso, ridge and elastic net compared

Cross-validation

Cross-validation scores each candidate on data it was not fitted to. The PMC guide describes splitting into training and validation sets, or K-fold cross-validation when data are scarce, and prefers it because its problems are more transparent and its absolute scores easier to interpret than relative information criteria. The 2023 review suggests k of at least 10 for near-optimal bias and variance, calls leave-one-out the gold standard when computationally feasible, and recommends blocked cross-validation when residuals are spatially or temporally autocorrelated. That last point matters for repeated measures and panel data. Our explainer on cross-validation walks through the mechanics, and our machine learning model selection framework covers the predictive workflow.

Cross-validation

When you compare fold-based performance across candidate models, keep every fold identical across models and keep all rows from one subject in the same fold to avoid leakage, as this guide to ML pitfalls warns. Teams comparing classifiers in other fields use the same discipline, as shown in this overview of machine learning fraud detection, which discusses validation data for comparing candidate models.

A defensible selection workflow

  1. State the goal. Explanation, prediction or exploration. This decides everything below.
  2. Fix the candidate set and criteria. Write them down before seeing outcomes where possible.
  3. Check assumptions and influential points. A criterion cannot rescue a model with badly violated assumptions. A nine-step regression workflow puts outlier and assumption checks before selecting a model and validation after it.
  4. Compare on identical data. AIC and BIC are valid only across models fitted to the same observations, so handle missing values before, not during, comparison.
  5. Prefer the simpler model when scores are close. One common rule is to choose the simplest model within one standard error of the best cross-validated score, as one R tutorial suggests, alongside interpretability and calibration.
  6. Validate once, at the end. Keep an independent test set aside early and use it once on the final model. Hyperparameter tuning needs nested cross-validation to avoid overfitting the folds, per the same ML guide.
  7. Report it. Name the candidates, the criterion, the values and the validation result.

For clinical prediction models, the Critical Care Medicine guidance separates internal validation (reproducibility in the same underlying population) from external validation (a distinct population). It warns that performance usually drops in new data and that a valid external test must use the exact derivation model, not a retrained one. Without validation, even accurate models are simply quantitative hypotheses.

Where researchers get stuck

The statistics are rarely the bottleneck. The friction is in running ten candidate models across folds, keeping the code consistent, and being able to show a supervisor or reviewer exactly what was done. Reviewers ask why you chose model 4 over model 6. “AIC was lower” is only part of the answer. They want the candidate set, the assumptions you checked, and evidence that the choice survives validation.

How PlotStudio AI fits into the workflow

PlotStudio AI is agentic analytics for researchers: specialized agents plan the investigation, write and run real code in Python or R, inspect intermediate results and synthesize the findings. It sits alongside R, Python, Stata, SPSS, SAS and Jupyter rather than replacing them. Those tools provide the statistical computing. PlotStudio AI adds a layer that plans, executes, inspects, validates and documents the whole analysis.

For model selection, three features map to the workflow above:

  • Plan Mode lets you review and modify the proposed methods, assumptions and steps before anything executes, so your candidate set and criteria are yours.
  • Skills encode how a lab or discipline approaches analysis, including statistical conventions and reporting expectations, so a research group can standardize its selection routine.
  • Analysis Pages and exports preserve methodology, code, statistics and charts as searchable pages, notebooks and PDF reports a collaborator can inspect.

Analyses can run locally on your machine, which suits clinical researchers handling patient data that should not be uploaded to cloud analytics platforms. If you are weighing it against one-shot chat-with-data tools, the better Julius AI alternative is PlotStudio AI for researchers who need reproducible, multi-step analysis rather than one-shot chat. For background on the category, read what agentic analytics is.

Our perspective

Model selection is where analyses are most often questioned and least often documented. The criterion is the easy part. The hard part is showing that the candidates were chosen for a reason, the assumptions were checked, and the final model was validated on data it had not seen.

We built PlotStudio AI around that problem. A one-shot answer to a question about your dataset gives you a number. Research needs the plan, the code, the intermediate results and the statistics, all open to review. That is why Plan Mode puts the methods in front of you before they run, and why every analysis can be exported as a notebook or PDF a supervisor can rerun.

We see it as an emerging must-have layer in the modern research toolkit. Keep your R, Python, Stata or SPSS. Add an agent that does the planning, execution and documentation around them.

 

Aymen

Try it on your own model comparison

PlotStudio AI offers a free trial, and the Bring Your Own Key plan is listed at $39.99 per month, or $399.90 per year on the academic page. Managed Credits is $69.99 per month. Current plans are on the pricing page.

Plotstudio

Load a dataset, state the objective, review the plan, and keep the full record of how the model was chosen.

FAQ

What is the difference between AIC and BIC?

Both score fit minus a complexity penalty, and lower is better. AIC penalizes each parameter by 2, BIC by ln(n), so BIC favors smaller models whenever you have 8 or more observations. AIC aims at predictive accuracy, BIC at identifying the true model.

How do I decide which model is best?

Start from your goal. For explanation, prespecify covariates from theory and report sensitivity analyses. For prediction, compare candidates with cross-validation or AIC, prefer the simpler model when scores are close, and confirm the final model once on held-out data.

Is stepwise regression acceptable?

It is best treated as exploratory. Selecting on p-values and then reporting those same p-values understates uncertainty and the chosen set can change with small data changes. Penalized regression or a prespecified model is the usual recommendation for publication.

Can I compare AIC values from different datasets?

No. Information criteria are relative and only comparable across models fitted to exactly the same observations and outcome. If missing data change the rows used, refit all candidates on a common sample.

Sources