Path: news.mathworks.com!not-for-mail
From: "Tom Lane" <tlane@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: glmfit iteration limit
Date: Wed, 23 Jul 2008 09:07:45 -0400
Organization: The MathWorks, Inc
Lines: 22
Message-ID: <g67af2$i91$1@fred.mathworks.com>
References: <g65cp8$dth$1@fred.mathworks.com>
Reply-To: "Tom Lane" <tlane@mathworks.com>
NNTP-Posting-Host: lanet.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1216818466 18721 172.31.57.151 (23 Jul 2008 13:07:46 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Jul 2008 13:07:46 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:481209



> 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