turn on suggestions

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

Showing results for

Find a Community

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

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-05-2012 07:59 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-06-2012 07:54 AM

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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-06-2012 06:49 PM

How many observations do you have?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-06-2012 07:15 PM

I have attached a file with proc logistic output with the convergence warning.. please have a look at it.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-07-2012 07:07 AM

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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-07-2012 11:15 AM

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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-13-2012 01:05 PM

Thanks Steve. that helps!