Why sigma is not symmetric positive semi-definite matrix?

조회 수: 6 (최근 30일)
Houda
Houda 2017년 7월 22일
댓글: Houda 2017년 7월 22일
Hey everybody, I am runing the estimation of the model using Bayesian estimation, The problem is that the error is always about the sigma matrix, I tried another set of data but the same problem arises:
??? Error using ==> mvnrnd at 118
SIGMA must be a symmetric positive semi-definite matrix.
Error in ==> encompassing_estimation at 99
x = mvnrnd(zeros(1,npars),V,nsim);
Error in ==> encompassing_estimation_run at 31
[out,parnew,par,VarCov] = encompassing_estimation(nsim,newV,DATA); % To be used in the first
or final iterations
I checked for the sigma matrix which is "V" the inverse of the Hessian matrix is squared symmetric matrix.
Is there any solution?

채택된 답변

Walter Roberson
Walter Roberson 2017년 7월 22일
In R2016b, the eig algorithms changed, which made a difference for determining whether matrices were symmetric positive definite. The changes affected the boundary conditions, matrices that were on the verge of being positive definite or not positive definite to within round-off error during the computation (the abstract indefinite precision calculation might show the matrix as clearly positive definite.)
Some of what has changed with the eig algorithm has just been in updating to newer versions of the fast multi-threaded libraries (e.g., LINPACK) with newer optimization.
It is always risky to take the numeric inverse of a matrix: round-off problems can easily dominate.

추가 답변 (1개)

Houda
Houda 2017년 7월 22일
Thanks dear Walter, in fact I am using Matlab R2010a, so do you suggest me to change to the R2016b version?
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 7월 22일
R2016b is more sensitive, more likely to give that problem.
Have a look at rcond(V) and you will see it is about 8.27510456108118e-12 which is nearly 0, indicating that the matrix is quite badly conditioned, nearly singular.
Houda
Houda 2017년 7월 22일
This means that there is nothing to do, Thanks dear Walter have a nice day.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by