[R] Sweave glm.fit

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Jun 3 09:44:40 CEST 2010


On Wed, 2010-06-02 at 20:29 +0200, Jimmy Söderly wrote:
> Dear R users,
> 
> After running Sweave, this is what I get :
> 
> Warning messages:
> 1: glm.fit: algorithm did not converge
> 2: glm.fit: algorithm did not converge
> There is no glm.fit function in my code.

glm calls glm.fit did you call glm() or any code that might use glm()
(or glm.fit()). glm.fit() is the function that does the actual model
fitting etc, with glm() being a convenience wrapper providing the
formula interface etc.

> Where does it come from ? From Sweave ? From system.time ?

Your call to glm() or any function that calls glm(). This is nothing to
sweave or system.time.

Your model fitting has failed to converge. There may be many reasons why
glm.fit is failing to converge for the model your are fitting.

Either extract the R code or tangle the sweave file to do the
extraction, and then step through the code to see where the warning is
being generated. Then figure out why glm.fit is not converging (you
might need to up the number of iterations or provide better starting
values or rethink the type of model you are trying to fit).

HTH

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list