Teaching helper for predictions from log-link and logit-link generalised
linear models. It wraps predict.glm with standard errors and
returns fitted values with confidence limits on either the link scale or the
response scale.
predictGLM(object, newdata, type = "link", cilevel = 0.95, quasit = FALSE, ...)A data frame with columns fit, lwr, and upr containing
fitted values and confidence limits on the requested scale.
a glm object, i.e. the output from glm.
prediction data frame.
"link" (default) or "response" for estimates and
confidence intervals on the linear predictor or response scale.
confidence level for the intervals.
if TRUE, use a t multiplier rather than a normal
multiplier for confidence intervals when object is a quasi model.
optional arguments that are passed to predict.glm.
New work should use predict20x, which handles lm and
glm fits with one function and gives results on the response scale by
default. predictGLM() keeps its own defaults and column names for
existing teaching material.
Note: newdata must include all first-order terms used in the fitted
model. This simplified requirement reflects the teaching-wrapper interface
and is not a complete reproduction of predict.glm().
predict, predict.glm, predictCount.