Learn R Programming

robust (version 0.3-0)

predict.glmRob: Predict Method for Robust Generalized Linear Model Fits

Description

Obtains predictions and optionally estimates standard errors of those predictions from a fitted robust generalized linear model object.

Usage

predict.glmRob(object, newdata, type = c("link", "response", "terms"), se.fit = FALSE, terms = labels(object), dispersion = NULL, ...)

Arguments

object
a glmRob object.
newdata
optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used.
type
a character string specifying the type of prediction. The choices are "link" for predictions on the scale of the linear predictor, "response" for predctions on the scale of the response, and "terms" which returns a matrix giving the fitted values for each
se.fit
a logical value. If TRUE then standard errors for the predictions are computed.
terms
when type = "terms" all terms are returned. A character vector specifies which terms are to be returned.
dispersion
the dispersion of the generalized linear model fit to be assumed in computing the standard errors. If omitted, that returned by 'summary' applied to the object is used.
...
additional arguments required by the generic predict method.

Value

  • If se.fit = FALSE, a vector or matrix of predictions. Otherwise a list with components:
  • fitPredictions
  • se.fitEstimated standard errors

See Also

glmRob, predict.

Examples

Run this code
data(breslow.dat)
bres.rob <- glmRob(sumY ~ Age10 + Base4 * Trt, family = poisson(), data = breslow.dat) 
predict(bres.rob)

Run the code above in your browser using DataLab