This augment method wraps augment.lm().

# S3 method for rlm
augment(x, ...)

Arguments

x

An rlm object returned by MASS::rlm().

...

Arguments passed on to augment.lm

data

A data.frame() or tibble::tibble() containing the original data that was used to produce the object x. Defaults to stats::model.frame(x) so that augment(my_fit) returns the augmented original data. Do not pass new data to the data argument. Augment will report information such as influence and cooks distance for data passed to the data argument. These measures are only defined for the original training data.

newdata

A data.frame() or tibble::tibble() containing all the original predictors used to create x. Defaults to NULL, indicating that nothing has been passed to newdata. If newdata is specified, the data argument will be ignored.

type.predict

Type of predictions to use when x is a glm object. Passed to stats::predict.glm().

type.residuals

Type of residuals to use when x is a glm object. Passed to stats::residuals.glm().

x

An lm object created by stats::lm().

Value

When newdata is not supplied augment.lm returns one row for each observation, with seven columns added to the original data:

.hat

Diagonal of the hat matrix

.sigma

Estimate of residual standard deviation when corresponding observation is dropped from model

.cooksd

Cooks distance, cooks.distance()

.fitted

Fitted values of model

.se.fit

Standard errors of fitted values

.resid

Residuals

.std.resid

Standardised residuals

Some unusual lm objects, such as rlm from MASS, may omit .cooksd and .std.resid. gam from mgcv omits .sigma. When newdata is supplied, returns one row for each observation, with three columns added to the new data:
.fitted

Fitted values of model

.se.fit

Standard errors of fitted values

.resid

Residuals of fitted values on the new data

Details

For tidiers for models from the robust package see tidy.lmRob() and tidy.glmRob().

See also