cooksd: Evaluates Cook's Distance.

Description Usage Arguments Value Note References Examples

View source: R/cooksd.R

Description

Evaluates Cook's Distance.

Usage

1

Arguments

fn

The function to use when creating the model. Either "glm" or "gamlss".

formula

The formula to use in the model.

data

The dataframe.

family

The distribution family. E.g. "poisson" if using glm. PO or NBI if using gamlss.

Value

A vector of distances

Note

Although lm/glm stores the original data in the model at m$data, that is not the case in GAMLSS. Therefore, unlike the function cooks.distance which only requires a model parameter, this function requires the formula and data.

References

https://www.ime.usp.br/~abe/lista/pdf1USQwcGBX1.pdf

Robust Diagnostic Regression Analysis, Anthony Atkinson and Marco Riani

Examples

1
2
3
cooksd(glm, f, df, "poisson")
cooksd(gamlss, f, df, PO)
cooksd(gamlss, f, df, NBI)

roland-hochmuth/gamlssdiag documentation built on May 20, 2019, 3:01 p.m.