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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.