View source: R/grubbs_outliers.R
grubbs_outliers | R Documentation |
Detects one or more outliers in a numeric variable using the iterative Grubbs' test, which assumes the data follow a normal distribution.
grubbs_outliers(dataSet, vD, alpha = 0.05)
dataSet |
A |
vD |
Unquoted name of the numeric variable to be tested for outliers. |
alpha |
Significance level for the test (default is |
The function applies Grubbs' test iteratively, removing the most extreme value and retesting until no further significant outliers are found. The test is valid only under the assumption of normality.
A data.frame
identical to the input, with an added logical column outL
indicating which observations were identified as outliers (TRUE
or FALSE
).
Grubbs, F. E. (1969). "Procedures for Detecting Outlying Observations in Samples." Technometrics, 11(1), 1–21. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00401706.1969.10490657")}
data(d_e, package = "Analitica")
d<-grubbs_outliers(d_e, Sueldo_actual)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.