Description Usage Arguments Details Value References Examples
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.
1 | robust.lm.onesided(formula, data, Q, Qname, maxit = 100, stop = F)
|
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) |
Uses iteratively reweighted least squares.
The final linear model fit (an object of class "lm").
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.
1 | robust.lm.onesided(formula=y~x1+x2,data=survdat.example,Q=250)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.