Skip to content

ols

linear-algebra · scripts/linear-algebra/ols.m

OLS  Ordinary least squares (Octave name).
  BETA = OLS(Y, X) solves Y = X*BETA + E in the minimum-norm least
  squares sense.
  [BETA, SIGMA, R] = OLS(Y, X) also returns residual covariance SIGMA
  and residuals R. MATLAB portable path is X\Y / regress. Unmarked
  MATLAB-mode scripts that never call this name are unaffected.

  See also GLS, mldivide, RANK.