Thread Subject: glmfit iteration limit

Subject: glmfit iteration limit

From: Ketan

Date: 22 Jul, 2008 19:35:04

Message: 1 of 3

Hello

I am getting a warning "iteration limit reached" while
using GLMFIT function.

How can I increase this iteration limit? I looked into the
code and figured it has hard coded iteration limit set to
100 iterations. Can I modify the code and increase this
iteration limit? Is there a reason (with statistical
significance) for restricting iteration limit to 100?

Regards,
Ketan

Subject: glmfit iteration limit

From: Tom Lane

Date: 23 Jul, 2008 13:07:45

Message: 2 of 3

> I am getting a warning "iteration limit reached" while
> using GLMFIT function.
>
> How can I increase this iteration limit? I looked into the
> code and figured it has hard coded iteration limit set to
> 100 iterations. Can I modify the code and increase this
> iteration limit? Is there a reason (with statistical
> significance) for restricting iteration limit to 100?

Ketan, there's no statistical reason for restricting the limit to 100. Feel
free to change it in your file. I'll record an enhancement request that
this be made adjustable in a future release.

One cause for excessive iterations can be complete separation in regression
with a binomial response. If the response is true/false, and if there's a
point p such that x<p is all true and x>p is all false, then the maximum
likelihood is infinite. (The same could be true if a linear combination of
multiple x values has such a point.) You could check for that condition.

-- Tom


Subject: glmfit iteration limit

From: Peter Perkins

Date: 23 Jul, 2008 13:42:25

Message: 3 of 3

Tom Lane wrote:

> One cause for excessive iterations can be complete separation in regression
> with a binomial response.

Just to follow up on what Tom said, 100 iterations is a _lot_ for the IRLS
algorithm that GLMFIT uses. I'm not saying that there aren't cases where you
usefully need more than that, but I suggest first looking that the fit that
you're getting after 100 iterations and seeing if there's anything you should be
paying more atention to in your data. Tom cites the most common example.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
iteration limit Ketan 22 Jul, 2008 16:34:12
glmfit Ketan 22 Jul, 2008 16:34:02
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com