[R] glm convergence warning

Duncan Mackay mackay at northnet.com.au
Fri May 18 02:04:14 CEST 2012


Hi Sophie

It helps if you do some detective work
Try

fit1 <- glm(formula = Y ~ offset(cst) + beta + tau, family = 
poisson,trace = T, maxit = 200)

and compare

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au

At 05:35 18/05/2012, you wrote:
>Hi,
>
>When I run the following code :
>
>Y <- c(rep(0,35),1,2,0,6,8,16,43)
>cst <- log(choose(42, 42:1))
>beta <- 42:1
>tau <- (beta^2)/2
>fit <- glm(formula = Y ~ offset(cst) + beta + tau, family = poisson)
>fit
>fit$converged
>
>glm prints a warning saying that the algorithm did not converge.
>However, fit$converged takes the value TRUE.
>
>I don't understand why fit$converged is not always FALSE when the 
>warning "algorithm did not converge" is produced. Could someone help 
>me understand why I get this result?
>
>Thanks a lot,
>
>Sophie
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list