Covariance matrix of estimates using lsqnonneg

2 次查看(过去 30 天)
Hello,
I want to solve the equation Ax=b for x>=0. How can I derive the covariance matrix of the estimates x. Using ordinary least-squares technique, the covariance matrix is given by
Q = inv(A)
x = Q*b
but how can I get the covariance matrix by using lsqnonneg?
xpos = lsqnonneg(A,b)
/Micha
  3 个评论
John D'Errico
John D'Errico 2017-5-10
That is not true for a lsqnonneg problem, IF any of the constraints are active!

请先登录,再进行评论。

回答(1 个)

Matt J
Matt J 2017-5-10
Rewrite the problem with a change of variables
min. f(z) = || A*z.^2-b||^2
This is now an unconstrained problem, so you can compute the covariance of z in the usual way from the Hessian of f(z) at z=sqrt(abs(xpos)). Then you can map covariance in z to covariance in x.
  3 个评论
Matt J
Matt J 2017-5-10
编辑:Matt J 2017-5-10
I'm not sure why it would be so hard to extrapolate a meaningful confidence interval from z. I can see that x=sqrt(|z|) will not be normally distributed. But if we're saying that z itself can still be modeled as normally distributed, then we can still deduce from standard confidence intervals that for example | z |<3*sigma with 99.8% probability. From there, we can deduce that 0<x<sqrt(3*sigma) with the same probability. So yes, it's a non-standard confidence interval in x, but does that mean it's not a useful one?
Matt J
Matt J 2017-5-10
Michael commented:
Thank you for your suggestions. I found a related question here (lsqnonneg function was not named). The bootstrap method is suggested as an approximation of the uncertainties of the estimates. John reports about reliable results.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by