referenceIntervals (version 1.2.0)

cook.outliers: Determines outliers using Cook's Distance

Description

A linear regression model is calculated for the data (which is the mean for one-dimensional data. From that, using the Cook Distances of each data point, outliers are determined and returned.

Usage

cook.outliers(data)

Arguments

data

A vector of data points.

Value

Returns a list containing a vector of outliers and a vector of the cleaned data (subset).

outliers

A vector of outliers from the data set

subset

A vector containing the remaining data, cleaned of outliers

Examples

Run this code
# NOT RUN {
	
cook.outliers(set50)
plot(cook.outliers(set50)$subset)

# }

Run the code above in your browser using DataCamp Workspace