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

Description Usage Arguments Value See Also Examples

View source: R/predict.glmRob.q

Description

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

Usage

1
2
3
4
## S3 method for class 'glmRob'
predict(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 term in the model formula on the scale of the linear predictor.

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:

fit

Predictions

se.fit

Estimated standard errors

See Also

glmRob, predict.

Examples

1
2
3
data(breslow.dat)
bres.rob <- glmRob(sumY ~ Age10 + Base4 * Trt, family = poisson(), data = breslow.dat)
predict(bres.rob)

robust documentation built on May 2, 2019, 5:20 p.m.