Learn R Programming

spmodel (version 0.8.0)

cooks.distance.spmodel: Compute Cook's distance

Description

Compute the Cook's distance for each observation from a fitted model object.

Usage

# S3 method for splm
cooks.distance(model, ...)

# S3 method for spautor cooks.distance(model, ...)

# S3 method for spglm cooks.distance(model, ...)

# S3 method for spgautor cooks.distance(model, ...)

Value

A vector of Cook's distance values for each observation from the fitted model object.

Arguments

model

A fitted model object from splm(), spautor(), spglm(), or spgautor().

...

Other arguments. Not used (needed for generic consistency).

Details

Cook's distance measures the influence of an observation on a fitted model object. If an observation is influential, its omission from the data noticeably impacts parameter estimates. The larger the Cook's distance, the larger the influence.

See Also

augment.spmodel() hatvalues.spmodel() influence.spmodel() residuals.spmodel()

Examples

Run this code
spmod <- splm(z ~ water + tarp,
  data = caribou,
  spcov_type = "exponential", xcoord = x, ycoord = y
)
cooks.distance(spmod)

Run the code above in your browser using DataLab