CookD: Calculates and plots Cook's distances for a Linear (Mixed)...

Description Usage Arguments Author(s) Examples

View source: R/CookD.R

Description

This function produces Cook's distance plots for a linear model obtained from functions aov, lm, glm, gls, lme, or lmer.

Usage

1
CookD(model, group=NULL, plot=TRUE, idn=3, newwd=TRUE)

Arguments

model

Model object returned by aov, lm, glm, gls, lme, and lmer.

group

Name (in "quotes") for indicating how observations are deleted for Cook's distance calculation. If group!=NULL then deletions will be along levels of group variable, otherwise, will be along individual observations.

plot

A logical variable; if it is true, a plot of Cook's distance will be presented. The default is TRUE.

idn

An integer indicating the number of top Cook's distances to be labelled in the plot. The default value is 3.

newwd

A logical variable to indicate whether to print graph in a new window. The default value is TRUE.

Author(s)

Dongwen Luo, Siva Ganesh and John Koolaard

Examples

1
2
3
4
5
6
library(predictmeans)
Oats$nitro <- factor(Oats$nitro)
fm <- lme(yield ~ nitro*Variety, random=~1|Block/Variety, data=Oats)
# library(lme4)
# fm <- lmer(yield ~ nitro*Variety+(1|Block/Variety), data=Oats)
CookD(fm)

predictmeans documentation built on May 19, 2017, 9:14 p.m.

Search within the predictmeans package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.