Solved
Contributor
Posts: 65

# Problem with 'second order optimality condition' in proc nlmixed

Hi everyone;

Am working with 9.3 version. I submit the following code :

proc nlmixed data=x;

lambda=exp(b0+blogdisage*logdisage+bloglos*loglos+bpows*powsYES

++b1mar*marMARRIED+b2mar*marPREVIOUSLY_MARRIED

+bseq*seq+e);

ll=-lambda*rtime**(alpha+1)+rstatus*(LOG(alpha+1)+alpha*LOG(rtime)+LOG(lambda));

MODEL rtime~GENERAL(ll);

RANDOM e~NORMAL(0,s2) SUBJECT=id;

PARMS b0=1 blogdisage=0 bloglos=0 bpows=0 b1mar=0 b2mar=0 bseq=0 s2=1 alpha=0;

run;

and got this notice in log:

NOTE: FCONV convergence criterion satisfied.

NOTE: At least one element of the (projected) gradient is greater than 1e-3.

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

Second-order optimality condition violated.

I could not understand what's happened but I have got the following parameter estimates that has nothing for S2 (Random Variance).

 b0 blogdisage bloglos bpows b1mar b2mar bseq s2 alpha 0.7987 0.6933 2443 1.15 0.2494 0.05 -0.5608 2.1582 718 -0.7512 0.1124 2443 -6.68 <.0001 0.05 -0.9717 -0.5308 2882.03 -0.1244 0.03542 2443 -3.51 0.0005 0.05 -0.1939 -0.05496 834.603 0.2024 0.4954 2443 0.41 0.6829 0.05 -0.7691 1.1740 -717.951 0.0381 0.04843 2443 0.79 0.4315 0.05 -0.05687 0.1331 34.7989 0.06841 0.04097 2443 1.67 0.0951 0.05 -0.01194 0.1488 190.922 -0.1507 0.03239 2443 -4.65 <.0001 0.05 -0.2142 -0.08721 829.152 -1.11e-12 . 2443 . . 0.05 . . 234.112 -0.4764 0.02492 2443 -19.12 <.0001 0.05 -0.5252 -0.4275 2446.75

Thanks!

Issac

Accepted Solutions
Solution
‎08-30-2012 09:20 AM
Valued Guide
Posts: 684

## Re: Problem with 'second order optimality condition' in proc nlmixed

Check out this excellent article from the most recent SAS Global Forum.

http://support.sas.com/resources/papers/proceedings12/332-2012.pdf

This paper deals with most of the common errors and warnings one can receive using the mixed-model procedures. Your Warning is discussed on page 14 (with good corrective hints).

All Replies
Posts: 2,655

## Re: Problem with 'second order optimality condition' in proc nlmixed

This is all a guess, without seeing the data structure.  I think there is a "complete solution" to the existing data, given the fixed effects, leaving no variability from individual to individual after accounting for all fixed effects.  I certainly would not trust any of the standard errors or tests, given that the Hessian is non-positive definite.  It may be that the model is over-specified.  What happens if you drop some of the fixed effects?

Steve Denham

Contributor
Posts: 65

## Re: Problem with 'second order optimality condition' in proc nlmixed

Steve;

Thanks for your response. When I drop 'e' (random effect) from the model new error named "Floating Point Zero Divide" has shown up. Also when I exclude some of categorical columns, it did'n change anything. I also check the over specification condition and almost sure that it is not the case in the model.

Solution
‎08-30-2012 09:20 AM
Valued Guide
Posts: 684

## Re: Problem with 'second order optimality condition' in proc nlmixed

Check out this excellent article from the most recent SAS Global Forum.

http://support.sas.com/resources/papers/proceedings12/332-2012.pdf

This paper deals with most of the common errors and warnings one can receive using the mixed-model procedures. Your Warning is discussed on page 14 (with good corrective hints).

Contributor
Posts: 65

## Re: Problem with 'second order optimality condition' in proc nlmixed

Ivm;

Thanks so much for bring this good paper into my attention. That's great!

Issac

🔒 This topic is solved and locked.