28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

lscov<br />

2-1378<br />

'orth' uses orthogonal decompositions, and is more appropriate when V is<br />

ill-conditioned or singular, but is computationally more expensive.<br />

[x,stdx] = lscov(...) returns the estimated standard errors of x. When A<br />

is rank deficient, stdx contains zeros in the elements corresponding to the<br />

necessarily zero elements of x.<br />

[x,stdx,mse] = lscov(...) returns the mean squared error.<br />

[x,stdx,mse,S] = lscov(...) returns the estimated covariance matrix of x.<br />

When A is rank deficient, S contains zeros in the rows and columns<br />

corresponding to the necessarily zero elements of x. lscov cannot return S if it<br />

is called with multiple right-hand sides, that is, if size(B,2) > 1.<br />

The standard formulas for these quantities, when A and V are full rank, are<br />

x = inv(A'*inv(V)*A)*A'*inv(V)*B<br />

mse = B'*(inv(V) - inv(V)*A*inv(A'*inv(V)*A)*A'*inv(V))*B./(m-n)<br />

S = inv(A'*inv(V)*A)*mse<br />

stdx = sqrt(diag(S))<br />

However, lscov uses methods that are faster and more stable, and are<br />

applicable to rank deficient cases.<br />

lscov assumes that the covariance matrix of B is known only up to a scale<br />

factor. mse is an estimate of that unknown scale factor, and lscov scales the<br />

outputs S and stdx appropriately. However, if V is known to be exactly the<br />

covariance matrix of B, then that scaling is unnecessary. To get the appropriate<br />

estimates in this case, you should rescale S and stdx by 1/mse and<br />

sqrt(1/mse), respectively.<br />

Algorithm The vector x minimizes the quantity (A*x-b)'*inv(V)*(A*x-b). The classical<br />

linear algebra solution to this problem is<br />

See Also lsqnonneg, qr<br />

x = inv(A'*inv(V)*A)*A'*inv(V)*b<br />

but the lscov function instead computes the QR decomposition of A and then<br />

modifies Q by V.<br />

The arithmetic operator \

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!