BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Unay13
Obsidian | Level 7

I have been trying a few different models with different functions but NB distribution. However, in one of the functions that I use, in my results, I get covariance matrix and correlation matrix of parameter estimates even though I did not use CORR or COV function. 

What could possibly be the reason for me to obtain such output in one function but not in others? Attached is the output. 

Is there any statistical problem in the function?

 

Any form of help would be highly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

> What could possibly be the reason for me to obtain such output in one function but not in others? 

> Is there any statistical problem in the function?

 

That is an interesting question. I am not 100% sure, but based on some testing I believe that the COV/CORR matrices will be displayed when 

1. The model converges, but

2. The Hessian at the solution "has a problem." 

Thus when they print, the procedure is encouraging you to look closely at the solution. There is something unusual about it.

The "problem" might be that it is not positive definite or that it is not invertible.

 

In my tests, one situation where I see the COV/CORR matrices when I am doing a constrained optimization and the optimal solution is on the boundary of the constraint region. In that case, the optimal solution is not a point where the gradient vanishes, and so the Hessian at the solution might not be positive definite.

 

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

> What could possibly be the reason for me to obtain such output in one function but not in others? 

> Is there any statistical problem in the function?

 

That is an interesting question. I am not 100% sure, but based on some testing I believe that the COV/CORR matrices will be displayed when 

1. The model converges, but

2. The Hessian at the solution "has a problem." 

Thus when they print, the procedure is encouraging you to look closely at the solution. There is something unusual about it.

The "problem" might be that it is not positive definite or that it is not invertible.

 

In my tests, one situation where I see the COV/CORR matrices when I am doing a constrained optimization and the optimal solution is on the boundary of the constraint region. In that case, the optimal solution is not a point where the gradient vanishes, and so the Hessian at the solution might not be positive definite.

 

Unay13
Obsidian | Level 7

Hi Rick,

 

So these were the notes in the Log file


NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: At least one element of the gradient is greater than 1e-3.
NOTE: Moore-Penrose inverse is used in covariance matrix.
WARNING: The final Hessian matrix is not positive definite, and therefore the estimated covariance
matrix is not full rank and may be unreliable. The variance of some parameter estimates is
zero or some parameters are linearly related to other parameters.

 

I came across an article which says that when above warning appears the results are not reliable. What are alternatives or other approaches to run the model without such errors?

 

Thank you for your response!

Rick_SAS
SAS Super FREQ

Your article should have mentioned that lack of convergence often indicates that the model does not fit the data. So alternatives to "run the model without such errors" include 

1. Choose a model that fits the data better

2. Get more data, if the sample size is very small

 

Unay13
Obsidian | Level 7

Thank you. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2930 views
  • 2 likes
  • 2 in conversation