BookmarkSubscribeRSS Feed
Unay13
Obsidian | Level 7

I am using NLMIXED for Negative Binomial modeling with user defined functions. One of the models worked, but when I replaced a function from :

 mu= 5*365*((MINAADT)**beta_1)* ((MAXAADT)**beta_2)*(EXP(beta_0))

with  this:

 5*365*(beta_0 + beta_1/((1+beta_2 *(MINAADT)**beta_3)*(1+beta_4*(MAXAADT)**beta_5)));
 

 Following error is shown in the Log.

 

 ERROR: QUANEW Optimization cannot be completed.
NOTE: QUANEW needs more than 200 iterations or 2000 function calls.
NOTE: PROCEDURE NLMIXED used (Total process time):
real time 0.19 seconds
cpu time 0.12 seconds

1 REPLY 1
Rick_SAS
SAS Super FREQ

You didn't ask a question, but 

1. If you are asking why the model didn't converge, the most likely reason is that the model does not fit the data and/or you did not provide a good initial guess for the parameters.

2. If you are asking what to do about it, then

   2a. Make a better initial guess for parameters

   2b. Change to a different optimize, such as  TECH=NMSIMP or TECH=NRRIDG

   2c.If you believe the model is almost converging, you can increase the number of iterations and the number of function evaluations that are permitted: MAXITER=500 MAXFUNC3000.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1 reply
  • 4838 views
  • 1 like
  • 2 in conversation