Peter, There is a clear and simple bug in glm() that I have noticed in 0.64.2 (Windows and Unix) but may have been present in earlier versions. The function starts as follows:> glmfunction (formula, family = gaussian, data = list(), weights = NULL, subset = NULL, na.action = na.fail, start = NULL, offset = NULL, control = glm.control(...), model = TRUE, method = "glm.fit", x = FALSE, y = TRUE, contrasts = NULL, ...) { call <- match.call(expand.dots = FALSE) ### <<<<---------------------------- ## family if (is.character(family)) family <- get(family) if (is.function(family)) family <- family() ## extract x, y, etc from the model formula and frame if (is.null(family$family)) { print(family) stop("`family' not recognized") } mt <- terms(formula, data = data) if (missing(data)) data <- sys.frame(sys.parent()) mf <- match.call() ### <<<<---------------------------- mf$family <- mf$start <- mf$control <- mf$maxit <- NULL mf$model <- mf$method <- mf$x <- mf$y <- mf$contrasts <- NULL mf$... <- NULL ###### The two marked lines should clearly be call <- match.call() and mf <- match.call(expand.dots = FALSE) The error in the first line can case problems with update() (I suspect) but the error in the second line does not allow isolated control arguments (like trace = T) to appear on the main call as they get passed on to the call to model.frame, causing pandemonium. As a confirmation of the second change above, unless you do have (expand.dots = FALSE) the last line quoted above has no effect. Regards, Bill Venables. -- ----------------------------------------------------------------- Bill Venables, Statistician, CMIS Environmetrics Project. Physical address: Postal address: CSIRO Marine Laboratories, PO Box 120, 233 Middle St, Cleveland, Queensland Cleveland, Qld, 4163 AUSTRALIA AUSTRALIA Telephone: +61 7 3826 7251 Email: Bill.Venables@cmis.csiro.au Fax: +61 7 3826 7304 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 13 Jul 1999 Bill.Venables@cmis.csiro.au wrote:> Peter,[Peter only fixes most of the bugs....]> There is a clear and simple bug in glm() that I have noticed in > 0.64.2 (Windows and Unix) but may have been present in earlier > versions.It has a long history: the expand.dots = FALSE was introduced in 0.63, but the second call has been wrong for longer.> The two marked lines should clearly be > > call <- match.call() > > and > > mf <- match.call(expand.dots = FALSE)as in S. I've committed this for 0.65.0. We have had various discussions about glm: it is proving very hard to maintain (that is, find the bugs) and is irritatingly different from S. One option is to reimplement it. Brian -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk schrieb:> On Tue, 13 Jul 1999 Bill.Venables@cmis.csiro.au wrote: > > > Peter, > > [Peter only fixes most of the bugs....] > > > There is a clear and simple bug in glm() that I have noticed in > > 0.64.2 (Windows and Unix) but may have been present in earlier > > versions. > > It has a long history: the expand.dots = FALSE was introduced in 0.63, > but the second call has been wrong for longer. > > > The two marked lines should clearly be > > > > call <- match.call() > > > > and > > > > mf <- match.call(expand.dots = FALSE) > > as in S. > > I've committed this for 0.65.0. > > We have had various discussions about glm: it is proving very hard to > maintain (that is, find the bugs) and is irritatingly different from S. > One option is to reimplement it.My opinion as a simple user ... reimplement glm is a very good idea!. Just for the "cosmetic" point of view: please, take out all of these silly *`s indicating significant levels in the output. Also, if somebody needs the "null deviance" make it as optional, and not in the stardard output. Best regards, Pablo. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._