Description Usage Arguments Value Examples
View source: R/outlier_influence.R
outlier_influence computes three diagnostic statistics for measuring influential points:
Difference in the fitted value when ith observation is removed
shows the influence of each observation on the fitted response values
influence on variance-covariance matrix
1 2 3 | outlier_influence(input_data, fit.model,
option = c("dffits", "cd" , "cvr"),
high.influence = FALSE)
|
input_data |
a data frame containing the variables in th model |
fit.model |
takes an R object, returned by lm |
option |
which measure of influence diagnostics should be computed. "dffits" is for DFFITS, "cd" is for Cook's distance, "cvr" is for COVRATIO |
high.influence |
(Default)FALSE; if TRUE, influential observation along with their respective diagnostic statistics will be returned. |
If high.influence is set TRUE, each diagnostic statistic will return a list containing two elements.
dffits, Cook's Distance, COVRATIO - depends on which option is chosen
outliers - which observations are considered influential
1 2 3 4 5 | ##Use demo_data (See ?demo_data for more information about the dataset)
m = lm(fev~A+H+M+S, data = demo_data)
outlier_influence(demo_data, m, option = c("dffits"))
outlier_influence(demo_data, m, option = c("cd"))
outlier_influence(demo_data, m, option = c("cvr"), high.influence = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.