BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
LOLO12
Obsidian | Level 7

Hi All, 

PROC NLIN failed to converge, I'm fitting around 500 model and this is expected. I want to have  missing values where it fil to converge or just don't get this warning at all. 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Take a look at the article, "Monitor convergence during simulation studies in SAS." It explains how to monitor convergence. You can use post-processing to set the predicted value to missing for models that did not converge.

 

Note that you cannot suppress WARNINGS, but you can use OPTIONS NONOTES to suppress the NOTEs.

 

It also might be worth investigating WHY these models are not converging. For example, some  BY groups might have an insufficient number of valid observations (eg, only 2 data points). You can pre-process the data to exclude those situations.

View solution in original post

6 REPLIES 6
ballardw
Super User

To help us help you it is generally a good idea to at least include the code you are currently running. Better would be to include a LOG entry including the code an all of the messages from the log.

 

Where do you want to have "missing values"? This is not an obvious, at least to me, requirement.

LOLO12
Obsidian | Level 7

in the estimates variables. it is still generating results in the estimate when the model didn't converge. 

PGStats
Opal | Level 21

The variable _STATUS_ in the OUTEST= dataset tells you which estimates are final (properly converged) or not.

PG
LOLO12
Obsidian | Level 7

Please have the log attachment. 

 

Here is the SAS code 

PROC NLIN DATA=slope1 ;
PARAMETERS L=1 to 3 U=3 to 16 R=.5;
Zl=(parcat3n < R)*(R - parcat3n);
MODEL aval=L + U*(Zl);
BY USUBJID TRTA PARAMN AVISION;
Output out=result parms=L parms=U parms=R
  predicted=predicted
  residual=residual
  sse=sumofsq_err
          stdr = standarderr;
run;
Rick_SAS
SAS Super FREQ

Take a look at the article, "Monitor convergence during simulation studies in SAS." It explains how to monitor convergence. You can use post-processing to set the predicted value to missing for models that did not converge.

 

Note that you cannot suppress WARNINGS, but you can use OPTIONS NONOTES to suppress the NOTEs.

 

It also might be worth investigating WHY these models are not converging. For example, some  BY groups might have an insufficient number of valid observations (eg, only 2 data points). You can pre-process the data to exclude those situations.

LOLO12
Obsidian | Level 7

I know why it is not converging for some of the data because some of formula that I'm using doesn't fit all observation. I want to know which  data is not coversiong so I can use the right algorithm. 

 

 

 

 

 

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Save $200 when you sign up by March 14!

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2004 views
  • 4 likes
  • 4 in conversation