robust.lm.onesided: Robust Regression using One-Sided Huber Function

Description Usage Arguments Details Value References Examples

Description

This function performs robust regression using M-estimation using the one-sided Huber function, with residuals truncated at Q / (data$gregwt-1) where data$gregwt is the generalized regression weight.

Usage

1
robust.lm.onesided(formula, data, Q, Qname, maxit = 100, stop = F)

Arguments

formula

The regression formula (e.g. income ~ employment + old.turnover if income is survey variable and employment and old.turnover are auxiliary variables).

data

A data frame including the variables in formula, and gregwt (generalized regression estimator weight), and regwt (weight to be used in regression - will be set to 1 if missing).

Q

The tuning parameter where large Q corresponds to no outlier treatment, and small Q corresponds to many outliers being flagged.

Qname

Gives a variable name on data which contains a separate tuning parameter Q for every observation (either Q or Qname should be specified but not both).

maxit

The maximum number of iterations.

stop

Set to T to open a browser window (for debugging purposes)

Details

Uses iteratively reweighted least squares.

Value

The final linear model fit (an object of class "lm").

References

Clark, R. G. (1995), "Winsorisation methods in sample surveys," Masters thesis, Australian National University, http://hdl.handle.net/10440/1031.

Kokic, P. and Bell, P. (1994), "Optimal winsorizing cutoffs for a stratified finite population estimator," J. Off. Stat., 10, 419-435.

Examples

1

Example output

Call:
lm(formula = formula, data = data, weights = irls.w)

Coefficients:
(Intercept)           x1           x2  
    -13.345        5.912       11.957  

surveyoutliers documentation built on May 2, 2019, 2:44 p.m.