Skip to content
Back to formatted view

Raw Message

Message-ID: <200005040347.NAA07873@snowy.nsw.cmis.CSIRO.AU>
Date: 2000-05-04T03:47:18Z
From: Bill Venables
Subject: logistic regression example from Devore5
In-Reply-To: Your message of "03 May 2000 21:24:08 EST." <6ru2gf833r.fsf@franz.stat.wisc.edu> 

Doug,

It looks to me like a convergence issue.  Here is the output from
"another, not dissimilar" facility for data analysis and graphics
(which I just happened to be using at the time):

---
> dug <- read.table("dug.txt")
> dm <- glm(Failure ~ Temperature, binomial, dug, trace=T)
GLM    linear loop 1: deviance = 21.387 
GLM    linear loop 2: deviance = 20.52 
GLM    linear loop 3: deviance = 20.482 
GLM    linear loop 4: deviance = 20.482 
> summary(dm)$coef
                Value Std. Error t value 
(Intercept)  11.74622   6.003206  1.9567
Temperature  -0.18843   0.088811 -2.1217
---

If you look back at your R output it is very close to yours but with
differences at about the fourth sig. fig.  Now slacken off the
convergence criterion to something pretty lax:

---
> dm <- glm(Failure ~ Temperature, binomial, dug, trace=T, eps=0.1)
GLM    linear loop 1: deviance = 21.387 
GLM    linear loop 2: deviance = 20.52 
> summary(dm)$coef
                Value Std. Error t value 
(Intercept)  10.79758   4.880483  2.2124
Temperature  -0.17356   0.071172 -2.4386
---

This is not altogether dissimilar to the result reported in Devore.
Now couple that with different the starting values and I think you
have a fair suggestion of what's going on.

No, there's nothing wrong with the way you are using glm, but the
important points I would make are

1. Always put trace = T in glm model fitting.  I really don't know why
it is not the default.

2. If in any doubt at all, see what difference it makes to strengthen
the convergence criterion.  This is surprisingly often necessary,
especially in "another, not dissimilar" working environment where they
don't have Brian Ripley working on their core team....

Regards,
Bill.
-- 
Bill Venables,      Statistician,     CMIS Environmetrics Project
CSIRO Marine Labs, PO Box 120, Cleveland, Qld,  AUSTRALIA.   4163
Tel: +61 7 3826 7251           Email: Bill.Venables at cmis.csiro.au    
Fax: +61 7 3826 7304      http://www.cmis.csiro.au/bill.venables/



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._