BookmarkSubscribeRSS Feed
Snehal
Obsidian | Level 7

I am running proc mixed with multiple type= values and creating dataset with ods output ConvergenceStatus=conv for checking convergence status. Is there a way I can suppress warnings generated in SAS log for non converged types, as all the information I need is available in the dataset. 

 

Warnings such as;

WARNING: Stopped because of infinite likelihood.

 or 

WARNING: Unable to make Hessian positive definite.

or 

WARNING: Did not converge.

9 REPLIES 9
SteveDenham
Jade | Level 19

Are you referring to the error:

 

ERROR: QUANEW Optimization cannot be completed.

 

or variations on this error?  If so, you can invoke the following option:

 

options errors=0;

 

However, this will suppress only error messages in the log associated with the data, which is not quite what you want I think.  Otherwise, I don't see an easy way, although a difficult way could be to text process the log file.

 

SteveDenham

Snehal
Obsidian | Level 7

I am trying to suppress following warnings in log 

 

WARNING: Stopped because of infinite likelihood.

 or 

WARNING: Unable to make Hessian positive definite.

or 

WARNING: Did not converge.

SteveDenham
Jade | Level 19

Those warnings all relate to different pathologies in the data relative to the model being used at the time, so I guess I would ask why you want to suppress them.  You wouldn't want to select the model that gave rise to these.  I am nowhere near good enough at programming to get these sent to a separate file along with the accompanying lines in the log that would make them useful.

 

SteveDenham

Snehal
Obsidian | Level 7

Yes, these warnings indicate the selected model is not the correct one for data, but these warnings are reflected in the ConvergenceStatus dataset I am creating using ODS, based on that dataset I am selecting a successfully converged model. So looking out for same way to keep log clean while checking these issues from dataset.

SteveDenham
Jade | Level 19

I've used up things I know. 

 

/soapbox ON

And if someone can't understand that WARNINGS are just that, and not ERRORS, then they shouldn't be reading SAS logs (which is what this sounds like is happening).  Documenting that the WARNINGS have been acknowledged in your ODS dataset ought to be satisfactory.

/soapbox OFF

 

SteveDenham

piao
Calcite | Level 5
Hi, I'm wondering if you have solved this because I also want to suppress the warning and use the info from the table ConvergStatus. Thank you!
SteveDenham
Jade | Level 19

Note my soapbox rant above regarding the WARNINGS. Truly the only way I know to suppress them is as follows:

 

WARNING: Stopped because of infinite likelihood.

    There are several things that might cause this, but the most common is multiple observations for the subject for a given cell defined by the fixed effects, e.g. two identical timepoints for a subject in a repeated measures analysis.

 

WARNING: Unable to make Hessian positive definite.

  This almost always is due to a model being more complex than the data will support. Unless you can collect more data, you should probably not include a model that results in this, no matter the convergence status. Odd things like infinite or zero degrees of freedom often turn up with this error.

 

WARNING: Did not converge.

  This may because the iteration has stopped at the default maximum. Try adding a MAXITER= option to your PROC MIXED statement. If that does not solve the problem, there are some things to try, but they require shifting to PROC GLIMMIX to get at other optimization techniques or rescaling variables.

 

For a great discussion of this, see this paper by Kiernan, Tao and Gibbs: Tips and Strategies for Mixed Modeling with SAS/STAT® Procedures 

 

SteveDenham

piao
Calcite | Level 5

Thank you.

 

I am running the proc logistic and getting the warning "There is possibly a quasi-complete separation of data points. The maximum likelihood estimate may not exist." for the group AVISITN=99 and GRPN=1 in the log. I can also get this information from the dataset ConvergenceStatus. So I would like to use the information from the dataset ConvergenceStatus to filter up the data first. But it seems that there is no way to only output the dataset ConvergenceStatus without the warning in the log before I know which group could not be converged.

 

 

ods output ConvergenceStatus=ConvergenceStatus;
proc logistic data = ana2 descending;
by avisitn grpn;
class trt01pn sitegrl/param=ref;
model resp = trt01pn sitegr1 base/ risklimits;
run;

 

 

SteveDenham
Jade | Level 19

You could run a cross-tab in PROC FREQ to identify avistn and grpn combinations where the resp values are all in one table of trt01pn*sitegr1.

 

For instance:

 

ods output crosstabfreqs=crosstabsfreqs;
proc freq data = ana2 descending; by avisitn grpn; tables resp*trt01pn*sitegr1; run;

Post processing the crosstabfreqs dataset should identify the separated combinations, which in turn could be removed from the PROC LOGISTIC analysis.

SteveDenham

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 9 replies
  • 1314 views
  • 3 likes
  • 3 in conversation