[R] se from predict.glm

Prof Brian Ripley
Thu, 17 Feb 2000 18:36:54 -0000

On Thu, 17 Feb 2000, Chong Gu wrote:

>
> I am not sure whether it is a design decision or just an oversight.
>
> When I ask for the standard errors of the predictions with
>
>   predict(budwm.lgt,se=TRUE)
>
> where budwm.lgt is a logistic fit of the budworm data in MASS, I got
>
>   Error in match.arg(type) : ARG should be one of response, terms
>
> If one is to construct a CI for the fitted binomial probability,
> wouldn't it be more natural to do it on the link scale before
> transforming to the probability scale?

Yes, that's what we (V&R) do normally.

> Of course, knowing a bit about what's going on inside glm, I could use
> predict.lm to get what I want, but I am curious why se is not made
> available for the link prediction in predict.glm.

It is, and this works in 0.99.0. You are hitting a bug in an earlier
version of R.

--
Brian D. Ripley,                  ripley at 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