Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Convergence warning after running proc logisitc

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-05-2012 07:59 PM
(8188 views)

Hi,

How should I deal with this warning which i got after running the proc logistic regression? is there any way to get rid of this? How do I know by how much to increase the MAXITER or what value to put for FCONVE GCONVE etc. I have never used these options before.

"Convergence was not attained in 25 iterations. You may want to increase the maximum number of iterations (MAXITER= option) or change the convergence criteria (ABSFCONV=, FCONV=, GCONV=, XCONV= options) in the MODEL statement."

the code looks like...

** **

**proc** **logistic** data =library.nismicathcabg4 descending ;

class female (ref= first) dm dmcx htn_c aids alcohol ANEMDEF arth race1(ref=first) ZIPINC_QRTL(ref=first) hosp_location h_contrl(ref=first) hosp_teach

bldloss chf chrnlung coag depress drug hypothy liver lymph lytes mets neuro obese para perivasc psych pulmcirc renlfail tumor

ulcer valve wghtloss cararrhythmia/param=ref;

model died= age female dm dmcx htn_c aids alcohol ANEMDEF arth race1 zipinc_qrtl hosp_location h_contrl hosp_teach TOTAL_DISC prday1

bldloss chf chrnlung coag depress drug hypothy liver lymph lytes mets neuro obese para perivasc psych pulmcirc renlfail tumor

ulcer valve wghtloss cararrhythmia ;

where thrombolytic1=**1** and stemi=**0**;

weight discwt;

title 'Logi Reg in-hosp mortality vs gender in POST-thrombolytic MI patients using "where" option with RACE +income for nstemi ncluding PRDAY1';

**run**;

**quit**;

File is attached with the proc logistic outout with convergence warning

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I would add /MAXITER=100 ITPRINT; to your model statement. Examine the iteration history, and then you could address changing the convergence criteria depending on the behavior of the log likelihood. However, just increasing the maximum number of iterations may solve your problems. It will not if the response surface is relatively flat and not well-characterized, i.e., you have 39 independent variables--the possibility of collinearity and lack of sufficient sample size to efficiently estimate all of these parameters can certainly lead to convergence problems.

Good luck.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

How many observations do you have?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

In the first model, nothing seems to be happening--I wonder about the response variable and quasi-complete separation. I still think you should run with the ITPRINT option, to look at what the likelihood is doing at each iteration.

In the second model, the singularity problem rears its head. Most likely, you have highly collinear variables in the model that convey almost exactly the same information. What do crosstabs show? I realize there are a lot of variables to check, but so long as the collinearity problem exists, the singularity problem is likely to arise.

Finally, addressing the question Reeza posed regarding number of observations, I think you are probably adequate in the second model, but near the edge for the first: 629 obs distributed over 47 indicator variables should be adequate, but only if the obs are evenly distributed. If there are many combinations that are extremely sparse, convergence will be a problem.

To get to a workable situation, see if some of the variables can be eliminated. Those that contain essentially identical information, based on crosstabs, can be combined.

Good luck.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Only 8 subjects had the outcome (Died), so your model is hopelessly overspecified. With that few outcomes, you can hardly fit one variable, let alone 47.

Doc Muhlbaier

Duke

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks Steve. that helps!

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.