[R] Robust multivariate regression with rlm

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Mar 24 09:12:30 CET 2005


On Thu, 24 Mar 2005 Bill.Venables at csiro.au wrote:

> lm works for multivariate responses
> rlm does not - check what the help file says about the response.
>
> That's about it, really.

Actually lm() works for multiple responses, that is it fits each column of 
the response separately by least squares.  It does not do multivariate 
regression in any real sense.

You can apply rlm to each column of the response, just as lm does. Because 
different outliers will appear in each column, there is no benefit in 
doing the columns in parallel as lm can do.

> -----Original Message-----
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Markku Mielityinen
> Sent: Thursday, 24 March 2005 5:20 PM
>
> I am having trouble with using rlm on multivariate data sets. When I
> call rlm I get
>
> Error in lm.wfit(x, y, w, method = "qr") :
>        incompatible dimensions
>
> lm on the same data sets seem to work well (see code example). Am I
> doing something wrong?

[...]

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list