Stepwise regression in MATLAB

Stepwise regression is an automated tool used in the exploratory stages of model building to identify a useful subset of predictors. In MATLAB, to create a stepwise regression model, use the stepwiselm() function. This function returns a linear model for the variables in the table or dataset array passed using stepwise regression to add or remove predictors. The stepwiselm() function uses forward and backward stepwise regression to determine a final model. The method begins with an initial model, specified using the modelspec attribute, and then compares the explanatory power of incrementally larger and smaller models. The most significant variable is added, or the least significant variable is removed during ...

Get MATLAB for Machine Learning now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.