Skip to content
Prev 23272 / 63421 Next

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

On Mon, 2006-12-18 at 12:53 +0000, Prof Brian Ripley wrote:
<snip>

Prof. Ripley,

Thanks for taking time to review this and present a solution.

I created a locally modified version of the VR bundle with this change
in profiles.R, installed it and can confirm that the modification does
work:

PropCI <- function(x, n, conf = 0.95)
{
  DF <- data.frame(y = x / n, weights = n)
  mod <- glm(y ~ 1, weights = weights, family = binomial, data = DF)
  plogis(confint(mod, level = conf))
}
Waiting for profiling to be done...
    2.5 %    97.5 % 
0.2490412 0.5651094
Waiting for profiling to be done...
    2.5 %    97.5 % 
0.2490412 0.5651094
Waiting for profiling to be done...
     2.5 %     97.5 % 
0.04672812 0.24963731
Waiting for profiling to be done...
     2.5 %     97.5 % 
0.04672812 0.24963731 


There was a brief flash in my mind over the weekend, wondering why (in
my examples) 'DF' was being looked for when the model frame could be
used instead. I appreciate your clarification on that point.

Thanks again and regards,

Marc