b = regress(y, X)
[b, bint] = regress(y, X)
[b, bint, r] = regress(y, X)
[b, bint, r, rint] = regress(y, X)
[b, bint, r, rint, stats] = regress(y, X)
[...] = regress(y, X, alpha)
regress estimates coefficients for a multiple linear regression model of response vector y on predictor matrix X.
Rows containing NaN values in y or X are omitted from the fit. Include a column of ones in X to fit an intercept.
y = [1; 2.1; 2.9; 4.2; 5.1; 5.9];
X = [ones(6, 1), (1:6)'];
[b, bint, r, rint, stats] = regress(y, X)
| Version | Description |
|---|---|
| 2.0.0 | initial version |