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 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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