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.
outlierCorr(oldRes, fence=3, saturCorr=FALSE, saturThresh=.05,
saturMin=NA, saturDivMax=3, outlierCorr=TRUE,
newM = TRUE)
list containing the elements dt
, a list of
corrected datasets, and weightList
, a list of new weight
matrices.
Object returned by fitModel
function
Object of class "numeric"
determining what
points to consider outliers.
whether to correct for saturation
See code.
See code.
See code.
whether to perform outlier correction
whether to add to the outliers and saturation points detected previously
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.
fitModel
, preProcess