- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- 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
--------------------------
- 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