Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

## 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

Examples

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

robust

Port of the S+ "Robust Library"

v0.5-0.0
GPL-2
Authors
Jiahui Wang, Ruben Zamar <ruben@stat.ubc.ca>, Alfio Marazzi <Alfio.Marazzi@inst.hospvd.ch>, Victor Yohai <vyohai@dm.uba.ar>, Matias Salibian-Barrera <matias@stat.ubc.ca>, Ricardo Maronna <maron@mate.unlp.edu.ar>, Eric Zivot <ezivot@u.washington.edu>, David Rocke <dmrocke@ucdavis.edu>, Doug Martin, Martin Maechler <maechler@stat.math.ethz.ch>, Kjell Konis <kjell.konis@me.com>.
Initial release
2020-03-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.