Description Usage Arguments Author(s) Examples

This function produces Cook's distance plots for a linear model obtained from functions `aov`

, `lm`

, `glm`

, `gls`

, `lme`

,
or `lmer`

.

1 |

`model` |
Model object returned by |

`group` |
Name (in "quotes") for indicating how observations are deleted for Cook's distance calculation. If |

`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. |

Dongwen Luo, Siva Ganesh and John Koolaard

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)
``` |

```
Loading required package: lme4
Loading required package: Matrix
Loading required package: nlme
Attaching package: 'nlme'
The following object is masked from 'package:lme4':
lmList
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.