Skip to contents

Fits a univariable polynomial regression using Huber M-estimation with degree selected by robust AIC (AICR), then flags observations whose residuals exceed a small-sample–adjusted multiple of the median absolute deviation.

Usage

OR.outliers.rlm(
  x,
  y,
  max.degree = 3,
  p = 0.05,
  tol.min = 1e-04,
  tol.target = 1e-04
)

Arguments

x

Numeric predictor vector.

y

Numeric response vector.

max.degree

Maximum polynomial degree considered. Default = 3. Internally capped at n - 2, where n is the number of non-missing observations.

p

Target two-sided exclusion proportion under normality for the residual-based modified z-score rule. Default = 0.05.

tol.min

M-estimation minimum convergence tolerance. Default = 0.0001.

tol.target

M-estimation target convergence tolerance. Default = 0.0001.

Value

Logical vector of the same length as y where TRUE indicates an outlying observation relative to the AICR-selected robust polynomial fit.

Details

For numerical stability, x and y are standardized before fitting.

See also