Skip to content
Prev 175629 / 398503 Next

Can not get a prediction interval from Predict

?predict.glm has no "interval" argument. Perhaps you're thinking of
?predict.lm, which is different.

To get intervals in glm, I've used:

example(predict.glm)
pr <- predict(budworm.lg, se.fit = TRUE)
family <- family(budworm.lg)
lower <- family$linkinv(pr$fit - qnorm(0.95) * pr$se.fit)
upper <- family$linkinv(pr$fit + qnorm(0.95) * pr$se.fit)

Note that these are "confidence" limits and not "prediction" limits.
The latter would require more thought.

You could also try RSiteSearch("glm interval").

HTH,

--sundar

On Tue, Mar 31, 2009 at 9:58 AM, Taylor Davis
<taylor.davis at klasresearch.com> wrote: