Stepwise Regression

Let the data choose a subset of predictors for a multiple regression — as an exploratory step.

Stepwise regression builds a multiple linear regression by adding or removing predictors one at a time according to a criterion. Forward selection starts with no predictors and adds the one that improves the model most; backward elimination starts with all candidates and removes the least useful; the bidirectional (both) method can do either at every step.

StatRyx uses an information criterion — AIC by default, or BIC, which penalises extra predictors more heavily — rather than p-value thresholds. It reports every step of the selection (which variable was added or removed and the criterion value), the predictors kept and dropped, and the final model: coefficients with SE, t and p, R², adjusted R², the overall F-test, and variance inflation factors for the retained predictors.

Stepwise selection has a well-known weakness: because the predictors were chosen from the same data, the p-values, confidence intervals and R² of the final model are too optimistic. StatRyx says so in every result. Treat the selected set as a hypothesis to confirm on new data, or use the stepwise result alongside a model you specified in advance from theory.

The outcome must be continuous. Candidate predictors can be numeric; very strongly correlated candidates make the selection unstable.

When to use the Stepwise Regression

When not to use it

Worked example

StepActionVariableAIC
1AddStudy hours1008.19
2AddMotivation989.83
—Not selectedSleep hours, commute time
Final modelR² = .57F(2, 147) = 95.47p < .001

How to report it (APA 7)

A bidirectional stepwise regression (AIC) selected study hours and motivation from four candidate predictors of exam score, R² = .57, adjusted R² = .56, F(2, 147) = 95.47, p < .001. Exam scores rose with study hours, b = 2.21, SE = 0.17, p < .001, and motivation, b = 3.06, SE = 0.66, p < .001. Because the predictors were selected from these data, the results are exploratory.

Frequently asked questions

Is stepwise regression free on StatRyx?

Yes. You can run it without an account (3 free analyses), and a free account adds 10 more — a one-time allowance, no payment needed. Every result includes the APA 7 write-up. Paid plans (Student from $9/month) add more analyses and Word, PDF and Excel export.

How do I report a stepwise regression in APA 7?

Name the method and criterion, the candidate predictors and those selected, then report the final model (R², F, df, p) and each coefficient. State that the analysis was exploratory because the predictors were selected from the data.

Why are stepwise p-values a problem?

The final model was chosen because it fitted these data well, so its p-values and R² do not account for the search. They are biased towards significance. Confirm the selected model on new data or report it as exploratory.

What is the difference between forward, backward and stepwise (both)?

Forward adds predictors one at a time, backward removes them one at a time from the full model, and both can add or remove at each step. They can end with different models, especially when predictors are correlated.

AIC or BIC?

AIC tends to keep more predictors and suits prediction; BIC penalises extra predictors more and tends to choose smaller models. StatRyx uses AIC unless you ask for BIC.

Run a Stepwise Regression on your data →

Related analyses