Running examples in ‘glm2-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: glm2
> ### Title: Fitting Generalized Linear Models
> ### Aliases: glm2
> 
> ### ** Examples
> 
> library(glm2)
> data(crabs)
> data(heart)
> 
> #==========================================================
> # EXAMPLE 1: logistic regression null model
> # (behaviour of glm and glm2 for different starting values)
> #==========================================================
> 
> y <- c(1,1,1,0)
> # intercept estimate = log(0.75/0.25) = 1.098612
> 
> #--- identitcal behaviour ---#
> fit1 <- glm(y ~ 1, family=binomial(link="logit"),
+ 	control=glm.control(trace=TRUE))
Deviance = 4.508808 Iterations - 1
Deviance = 4.498692 Iterations - 2
Deviance = 4.498681 Iterations - 3
Deviance = 4.498681 Iterations - 4
> fit2 <- glm2(y ~ 1, family=binomial(link="logit"),
+ 	control=glm.control(trace=TRUE))
Deviance = 4.508808 Iterations - 1 
Deviance = 4.498692 Iterations - 2 
Deviance = 4.498681 Iterations - 3 
Deviance = 4.498681 Iterations - 4 
> print.noquote(c(fit1$coef,fit2$coef))
(Intercept) (Intercept) 
   1.098612    1.098612 
> 
> #--- convergence via different paths ---#
> fit1 <- glm(y ~ 1, family=binomial(link="logit"),start=-1.75,
+ 	control=glm.control(trace=TRUE))
Deviance = 6.425267 Iterations - 1
Deviance = 10.96289 Iterations - 2
Deviance = 5.632207 Iterations - 3
Deviance = 5.516797 Iterations - 4
Deviance = 4.506086 Iterations - 5
Deviance = 4.498685 Iterations - 6
Deviance = 4.498681 Iterations - 7
Deviance = 4.498681 Iterations - 8
> fit2 <- glm2(y ~ 1, family=binomial(link="logit"),start=-1.75,
+ 	control=glm.control(trace=TRUE))
Deviance = 6.425267 Iterations - 1 
Deviance = 10.96289 Iterations - 2 
Warning: step size truncated due to increasing deviance
Step halved: new deviance = 4.610953 
Deviance = 4.499222 Iterations - 3 
Deviance = 4.498681 Iterations - 4 
Deviance = 4.498681 Iterations - 5 
> print.noquote(c(fit1$coef,fit2$coef))
(Intercept) (Intercept) 
   1.098612    1.098612 
> 
> #--- divergence of glm to infinite estimate ---#
> fit1 <- glm(y ~ 1, family=binomial(link="logit"),start=-1.81)
Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
> fit2 <- glm2(y ~ 1, family=binomial(link="logit"),start=-1.81)
Warning: step size truncated due to increasing deviance
> print.noquote(c(fit1$coef,fit2$coef))
 (Intercept)  (Intercept) 
2.251800e+15 1.098612e+00 
> 
> 
> #=======================================================================
> # EXAMPLE 2: identity link Poisson (successful boundary convergence
> # using 4 identical approaches in glm and glm2 with the method argument) 
> #=======================================================================
> 
> satellites <- crabs$Satellites
> width.shifted <- crabs$Width - min(crabs$Width)
> dark <- crabs$Dark
> goodspine <- crabs$GoodSpine
> 
> fit1 <- glm(satellites ~ width.shifted + factor(dark) + factor(goodspine), 
+  family = poisson(link="identity"), start = rep(1,4))
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: glm.fit: algorithm stopped at boundary value
> 
> fit2 <- glm2(satellites ~ width.shifted + factor(dark) + factor(goodspine), 
+  family = poisson(link="identity"), start = rep(1,4))
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: glm.fit2: algorithm stopped at boundary value
> 
> fit1.eq <- glm2(satellites ~ width.shifted + factor(dark) + factor(goodspine), 
+  family = poisson(link="identity"), start = rep(1,4), method = "glm.fit")
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: step size truncated: out of bounds
Warning: glm.fit: algorithm stopped at boundary value
> 
> fit2.eq <- glm(satellites ~ width.shifted + factor(dark) + factor(goodspine), 
+  family = poisson(link="identity"), start = rep(1,4), method = "glm.fit2")
Error in glm.fit2(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  : 
  unused argument (singular.ok = TRUE)
Calls: glm -> eval -> eval
Execution halted