Grubbs' test
We've now checked that the data are normal. Now let's apply Grubbs' outlier test!
Grubbs' test assesses whether the value that is farthest from the mean is an outlier - the value could be either the maximum or minimum value. The test is performed using the grubbs.test()
function from the outliers
package:
grubbs.test(x)
x
is the input data as a numeric vector
This exercise is part of the course
Introduction to Anomaly Detection in R
Exercise instructions
- Run the Grubbs' test on the
nitrate
concentrations.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Apply Grubbs' test to the river nitrate data
___(___)