Hello,
when I ran proc glimmix, I found the note "At least one element of the gradient is greater than 1e-3." in the log file and the output said:
The GLIMMIX Procedure
Iteration History
Objective Max
Iteration Restarts Evaluations Function Change Gradient
0 0 10 151.61524767 . 13.80694
1 0 13 145.29950034 6.31574732 4.078536
2 0 8 144.92020933 0.37929101 0.449007
4 1 120 144.91874425 0.00146509 0.031734
5 1 15 144.91872632 0.00001792 0.029066
6 1 31 144.91871078 0.00001554 0.050775
The convergence status is indeterminate.
However, the status variable in the convergence status table is 0 (i.e. successful optimization) with reason ''The convergence status is indeterminate." I am somewhat confused, because from my understanding, the status in the convergence table should not indicate successful optimization? Therefore I was wondering whether the estimates are reliable or not. And what I could do to prevent this indeterminate convergence status?
Thanks in advance and regards,
M
I performed a few experiments that might be useful to others:
1. If you remove the PARAM / LOWERB= statement, the some of the covariance estimates are negative and the estimated G matrix is not PD. I think this explains why the gradient isn't zero at the solution: the solution is not a local optimum but is a constrained optimum.
2. If you change the TECH= option in the NLOPTIONS statement, sometimes the problem converges and sometimes it doesn't. The problem converges for NEWRAP and QUANEW and doesn't give the mysterious "indeterminate status."
Good luck.
That is part of the output I have never seen before. I am curious to its origin. Could you please share your GLIMMIX code?
Steve Denham
Thanks for your time! I also use SAS 9.4TS1M3 and ran the following code. Some sample data is attached
ods output ConvergenceStatus=cs;
proc glimmix data=data method= laplace;
class outcome predictor study;
model outcome(ref= "3")=predictor/ dist=multinomial link=glogit s cl;
random predictor /sub=study group=outcome G type= Chol;
nloptions maxiter=5000 tech=nrridg;
parms / lowerb=1e-4,.,1e-4,1e-4,., 1e-4;
freq count;
run;
Why does proc glimmix stop the optimization process at all? Thanks again!
When the likelihood is maximized, all gradient values should be zero. Since we're dealing with an iterative optimization algorithm, exact zero is obviously not possible, so you're looking for the gradients to be close to zero. Of course, how close is "close" is anybody's guess. GLIMMIX sets a bar at 0.001, though there's nothing magical about it. So, as it says, the convergence in this is indeterminate since the biggest gradient value is bigger than that. That's not to say that the solution presented is bad. It just alerts you that you'll want to assess the resulting model.
@StatDave, I've seen the log note that at least one element of the gradient is greater than 1e-3 many times, but I have never seen the output statement 'The convergence status is indeterminate' before. I'm now running 9.4TS1M3, but have been using GLIMMIX ever since it became available.
Is there more to this story?
Steve Denham
What model is being fit? What optimization method is being used? Without the SAS code (and possibly the data) there is no way to guess what is happening.
I performed a few experiments that might be useful to others:
1. If you remove the PARAM / LOWERB= statement, the some of the covariance estimates are negative and the estimated G matrix is not PD. I think this explains why the gradient isn't zero at the solution: the solution is not a local optimum but is a constrained optimum.
2. If you change the TECH= option in the NLOPTIONS statement, sometimes the problem converges and sometimes it doesn't. The problem converges for NEWRAP and QUANEW and doesn't give the mysterious "indeterminate status."
Good luck.
In case it helps, here is the result of PROC FREQ on the data. Notice that most of the observations are for outcome=1, with relatively few observations for outcome=2 and outcome=3. Notice also that these subsets have many cells with zero counts and that outcome=3 is used as the reference category.
proc freq data=ts.data;
tables outcome*predictor*study / nocum norow nocol nopercent;
weight count;
run;
Exactly, I wanted the G Matrix to be p.d and did not realize that this might cause other trouble.
Thank all of you for your precious support!
Just adding to Steve's comments. I have used GLIMMIX countless times, and have often dealt with convergence problems and problems with large parameter gradients at the solution. I've gotten all the standard warnings, but I don't recall ever seeing the message mentioned in the OP. I think something else is going on.
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!
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.