View source: R/CreateCooksDistancePlot.R
Simple wrapper to Compute Cook's distance and generate plot for it.
1 2 3 4 5 6 7 |
critical.value |
Numeric vector of length 1. Plotted as a dashed line, as a indicator of influential points. Defaults to NULL, in which case the value is not plotted. If not NULL, the observations whose corresponding values exceed the critical value is labelled in the plot. Else, the observations with the top 3 highest values are labelled. |
return.inf |
Logical vector of length 1. If TRUE the points that are "influential" are returned. Depends on the critical.value param: If NULL, then the top three points are returned, and if not null then the points whose values exceed the critical.value is returned. Defaults to TRUE. |
dir |
Character vector of lenght 1. Directory in which to store the plot. Ignored if save.plot is FALSE. Defaults to "." |
save.plot |
Logical vector of length 1. If TRUE then the plot is saved to disk. Defaults to TRUE |
data |
data.frame object. Data as prepared in RunProject.R. Regressor values, predicted response, and residuals. No default. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.