Skip to contents

This function will flag outlier objects based the worm_length_um variable.

Usage

outlierOF(data, iqr = TRUE, thresh = NULL, filterOF = TRUE)

Arguments

data

A data frame output from the modelSelection function.

iqr

Logical, if TRUE, objects in a well are called outliers if their worm_length_um is outside the range median(worm_length_um) +/- (thresh * IQR). If FALSE, objects in a well are called outliers if their worm_length_um is outside the range mean(worm_length_um) +/- (thresh * SD). The default is TRUE. NOTE: The Interquartile Range (IQR) method is useful for most distributions. The Standard Deviation (SD) method should only be applied to normal distributions.

thresh

A numeric value used to calculate outliers. By default this parameter is set to NULL. If thresh = NULL then it is set to the recommended values within the function: (1.5 if iqr = TRUE) and (3 if iqr = FALSE).

filterOF

Logical, if TRUE any flagged objects detected in data are not considered for the calculation of outliers.

Value

A single data frame identical to the input data with the outlier_ObjectFlag variable added. The outlier_ObjectFlag variable is coded as "outlier" for objects deemed outliers and NA_character_ for non-outliers.