outlierCorr {TIMP}R Documentation

Finds and removes outliers from a datasets

Description

Finds and removes outliers from datasets given the results of fitting as returned by fitModel. Uses the residuals in the fitted results to return a list of corrected datasets to be used in place of the datasets used in the call to fitModel as well as a list of weights. The data returned contains the fitted values at pointed that are outliers and will be assigned zero weight in subsequent fits.

Usage

outlierCorr(oldRes, fence=3, saturCorr=FALSE, saturThresh=.05,
                          saturMin=NA, saturDivMax=3, outlierCorr=TRUE,
                          newM = TRUE) 

Arguments

oldRes Object returned by fitModel function
fence Object of class "numeric" determining what points to consider outliers.
saturCorr whether to correct for saturation
saturThresh See code.
saturMin See code.
saturDivMax See code.
outlierCorr whether to perform outlier correction
newM whether to add to the outliers and saturation points detected previousely

Details

We calculate the fourth spread at a given value of x2 in a dataset. Those points that are less than the first quartile minus the fourth spread times fence are outliers, as are those points that are more than the third quartile plus the fourth spread times fence. Outliers are assigned a weight of zero and are assigned the values found in fitting for the purpose of generating smooth-looking plots.

Value

list containing the elements dt, a list of corrected datasets, and weightList, a list of new weight matrices.

See Also

fitModel, preProcess


[Package TIMP version 1.8 Index]