plot_cook: Plot Cook

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ares.r

Description

Plot Cook's distance

Usage

1
plot_cook(x, type = "deviance", line = 0.1, new = TRUE, ...)

Arguments

x

a model fitted by fit_core

type

a quoted string indicating the type of residuals to extract. Default is "deviance". See get_residuals

line

a value indicating where to plot a horizontal line on the y-axis. Set NULL for none

new

if TRUE a new graph window is opened

...

further options for plot

Details

This function extracts the residuals of x, computes de Cook's distance, and generates a plot for each observation. It is a very useful tool for influence analysis.

Value

This function does not return a value.

Author(s)

Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

References

McGullagh, P., Nelder, J. A. (1989) Generalized linear models. Chapman and Hall.

Hastie, T., Tibshirani, R. (1990) Generalized additive models. 2 ed. Chapman and Hall.

Cook, R. D., Weisberg, S. (1982) Residuals and Influence in Regression. Chapman and Hall.

Atkinson, A.C. (1985) Plots, Transformations and Regression. Oxford University Press.

Pierce, D. A., Schafer, D. W. (1986) Residuals in generalized linear models. Journal of the American Statistical Association, 81(396),977–986.

See Also

fit_core,get_residuals

Examples

1
2
3
4
5
data(admrio)
setup(admrio,"date")
f <- resp5~s(time)+weekdays+s(tmpmax)+s(humid)
m <- fit_core(f)
plot_cook(m)

wjunger/ares documentation built on Dec. 23, 2021, 5:17 p.m.