Skip to content
Prev 23269 / 63424 Next

Curious finding in MASS:::confint.glm() tied to eval()

On Sat, 16 Dec 2006, Marc Schwartz wrote:

            
Looks like MASS:::profile.glm could be simplified to

profile.glm <- function(fitted, which = 1:p, alpha = 0.01,
                         maxsteps = 10, del = zmax/5, trace = FALSE, ...)
{
     Pnames <- names(B0 <- coefficients(fitted))
     pv0 <- t(as.matrix(B0))
     p <- length(Pnames)
     if(is.character(which)) which <- match(which, Pnames)
     summ <- summary(fitted)
     std.err <- summ$coefficients[, "Std. Error"]
     mf <- model.frame(fitted)

and this will then work.  That used not to work, including when the 
function was last updated.  The reason it works is that model=TRUE is now 
the default on all the model-fitting functions, as re-creating the model 
frame proved to be too error-prone.