.BG
.VE $Header: /usr3/s/current/s/.help/RCS/rreg,v 1.3 84/04/30 16:16:36 rab Exp $
.FN rreg
.TL
rreg: Robust Regression
.CS
rreg(x, y)         # simple form
rreg(x, y, w, int, init, method, wx, iter, k, acc, stop, conv)
.PP
.AG x
matrix of independent variables for regression.  Should not
include a column of 1's for the intercept.
.AG y
vector of dependent variable, to be regressed on `x'.
.AG w
initial weights for robustness.
`w' may be the weights computed from residuals in previous
iterations of `rreg'.
The argument `wx' should be used for weights that are to remain constant
from iteration to iteration.
.AG int
should intercept term be included in the regression?
Default TRUE.
.AG init
optional vector of initial coefficient values (normally the result of
some other regression, e.g., `reg(x,y)$coef' or `l1fit(x,y)$coef').  When
omitted the initial value is computed as follows:
if `wx' and/or `w' is supplied, it is the weighted least squares estimate,
otherwise it is the ordinary least squares
estimate.
.AG method
choice of method (see below).  Default is the converged
Huber estimate followed by two iterations of Bisquare.
.AG wx
optional weighting vector (for intrinsic weights, not the
weights used in the iterative fit).
.AG iter
maximum number of iterations; default 20.
.AG k
constant in the weighting function.  This constant is chosen
to give the estimate a reasonable efficiency if the errors
do come from a normal distribution.  (See below for exact
values.)
.AG acc
convergence tolerance; default 10*sqrt(machine precision).
.AG stop
method of testing convergence. Values 1 (default),2,3,4 use
relative change in residuals, coefficients and weights and an
orthogonality test of residuals to x.
.AG conv
should component `conv' be returned as a result?  Default
FALSE.
.RT
structure with the following components:
.PP
.AG coef
vector of coefficients in final fit.
.AG resid
vector of final residuals.
.AG w
vector of final weights in the iteration, excluding the influence of `wx'.
.AG int
flag telling whether intercept was used.
.AG method
name of robust weighting rule used.
.AG k
value of `k' used for `method'.
.AG conv
vector of the value of the convergence criterion at each
iteration.
.SH METHOD
The routine uses iteratively reweighted least squares to
approximate the robust fit, with residuals from the current
fit passed through a weighting function to give weights for
the next iteration.  There are 8 possible weighting
functions, all specified by character strings given as
method: "andrews", "bisquare",
"cauchy", "fair", "huber", "logistic", "talworth", and "welsch".  The
corresponding default values of `k' are 1.339, 4.685, 2.385,
1.4, 1.345, 1.205, 2.795, and 2.985.
Method "huber" gives more least-squares-like fits usually;
the proper choice of method, however, is still a research
problem.
.SH REFERENCE
Coleman, D., Holland, P., Kaden, N., Klema, V., and Peters, S. C.,
"A system of subroutines for iteratively re-weighted least-squares computations",
.ul
ACM Trans. Math. Soft.,
Vol. 6, 327-336, 1980.
.KW array*
.KW regression
.KW robust
.WR
