lm works for multivariate responses
rlm does not - check what the help file says about the response.
That's about it, really.
Bill Venables.
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Markku
Mielityinen
Sent: Thursday, 24 March 2005 5:20 PM
To: r-help at stat.math.ethz.ch
Subject: [R] Robust multivariate regression with rlm
Dear Group,
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?
I have already browsed through the forums and google but could not find
any related discussions.
I use Windows XP and R Version 2.0.1 (2004-11-15) (if that makes a
difference).
Example code:
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