Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- WARNING: The final Hessian matrix is full rank but has at least one ne...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-09-2021 02:24 PM
(2014 views)

Hello,

I am working on fitting nonlinear mixed model to my data using proc nlmixed.

My model has four fixed effects & five random effects.

But when I run the program, I get the following warning:

WARNING: The final Hessian matrix is full rank but has at least one

negative eigenvalue.

Second-order optimality condition violated.

Please help me solve this problem and guide me to the right way to solve this problem.

My code is the following and the data is in the attachment:

proc import datafile='C:\Users\Abbas Arkawazi\Desktop\test.xlsx'

DBMS =xlsx Out=test;

run;

proc nlmixed data=test ;

parms b0=1 b1=2 b2=3 b3=4 a=2 b=1 aa=3 bb=1 s=100;

m =b0+(b1*age)+(b2*creatin)+(b3*gender);

y=urea;

if status_u=1 then f=((aa*bb*a*b)/s)*(exp(-b*exp((y-m)/s)))*((1-exp(-b*exp((y-m)/s)))**(a-1))*((((1-exp(-b*exp((y-m)/s)))**a)**(aa-1))/((1-((1-exp(-b*exp((y-m)/s)))**a))**(aa+1)))*((1+((((1-exp(-b*exp((y-m)/s)))**a)/(1-((1-exp(-b*exp((y-m)/s)))**a)))**aa))**(-bb-1)) ;

else f= 1-((1+(((1-exp(-b*exp((y-m)/s)))**a)/(1-(1-exp(-b*exp((y-m)/s)))**a))**aa)**-bb) ;

ll=log(f);

model y ~ general(ll);

run;

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

**"Final Hessian"**

Somebody should take that as a username.

--------------------------

The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for

Allow PROC SORT to output multiple datasets

--------------------------

The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for

Allow PROC SORT to output multiple datasets

--------------------------

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

If the Hessian is full rank with a negative eigenvalue, you have two options. One is to use a simpler model, the other is to find out which line of data (or lines) lead to the problem. You could use a pseudo-jackknife approach to the latter, fitting the model while successively deleting a single observation. If all of the reduced datasets lead to the same issue, then it is almost certainly a misspecification of the model issue.

SteveDenham

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 25. Read more here about **why** you should contribute and **what is in it** for you!

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.