MATLAB Function Reference
  Go to function:
    Search    Help Desk 
lscov    See Also

Least squares solution in the presence of known covariance

Syntax

Description

x = lscov(A,b,V) returns the vector x that solves A*x = b + e where e is normally distributed with zero mean and covariance V. Matrix A must be m-by-n where m > n. This is the over-determined least squares problem with covariance V. The solution is found without inverting V.

[x,dx] = lscov(A,b,V) returns the standard errors of x in dx. The standard statistical formula for the standard error of the coefficients is:

Algorithm

The vector x minimizes the quantity (A*x-b)'*inv(V)*(A*x-b). The classical linear algebra solution to this problem is

but the lscov function instead computes the QR decomposition of A and then modifies Q by V.

See Also

\       Matrix left division (backslash)

nnls        Nonnegative least squares

qr          Orthogonal-triangular decomposition

Reference

Strang, G., Introduction to Applied Mathematics, Wellesley-Cambridge, 1986, p. 398.



[ Previous | Help Desk | Next ]