CreateCooksDistancePlot: CreateCooksDistancePlot

Description Usage Arguments

View source: R/CreateCooksDistancePlot.R

Description

Simple wrapper to Compute Cook's distance and generate plot for it.

Usage

1
2
3
4
5
6
7
CreateCooksDistancePlot(
  fit,
  critical.value = NULL,
  return.inf = TRUE,
  dir = ".",
  save.plot = TRUE
)

Arguments

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.


itslwg/regone documentation built on Oct. 14, 2021, 12:52 a.m.