Regression Analysis

Linear and nonlinear regression


MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

MuPAD Functions

stats::hodrickPrescottFilterThe Hodrick-Prescott filter
stats::linRegLinear regression (least squares fit)
stats::regRegression (general linear and nonlinear least squares fit)


Univariate Linear Regression

Regression is the process of fitting models to data.

Univariate Nonlinear Regression

Nonlinear regression can assume any type of relationship between the dependent variable y and independent variables xj.

Multivariate Regression

The stats::reg function also performs linear and nonlinear regressions with two or more independent variables.