FUNCTION REFERENCE
LinearModel
Linear regression model returned by fitlm or stepwiselm.
Linear regression model returned by fitlm or stepwiselm.
Syntax
mdl = fitlm(X, y)Holds fitted coefficients, R-squared, RMSE, degrees of freedom, sums of squares (SSE, SST, SSR), residuals, fitted values, formula, log-likelihood and information criteria. Call predict(mdl, Xnew) to evaluate predictions.
Example
mdl = fitlm([1; 2; 3; 4], [2; 4; 6; 8]); class(mdl) % 'LinearModel'Differences from MATLAB: Supports numeric matrix and table predictors with OLS fitting; robust fitting and interactive diagnostic plots are not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.