[R] qr and Moore-Penrose

Thu Jul 1 09:35:13 CEST 1999

```
On Wed, 30 Jun 1999, Prof Brian Ripley wrote:

>
> > Date: Wed, 30 Jun 1999 15:44:58 +0200 (MET DST)
> > From: Torsten Hothorn <hothorn at amadeus.statistik.uni-dortmund.de>
> > To: Prof Brian Ripley <ripley at stats.ox.ac.uk>
> > cc: r-help at stat.math.ethz.ch
> > Subject: Re: [R] qr and Moore-Penrose
> >
> >
> > > What is a correct result, by the way?  There are infinitely many solutions
> > > for the regression of y on X, and the Moore-Penrose one is just one choice
> > > (that assumes that the coefficients are somehow comparable).
> >
> > hm, 1.5, -0.5, 0.5, 1.5 should be a unique solution to Xb = y (with
> > minimal 2-norm).
>
> And my point was `what has `minimal 2-norm' got to do with this'?
> Regression coefficients are not necessarily in the same units: they are
> not in a Euclidean space.  There are lots of other solutions with
> claims to be reasonable, including those which use just `rank' of the
> columns. qr gives one of the latter.
>

my formulation was not strikt. what we all expect from least squares is a
solution b1 of the system Xb = y with 2-norm || Xb1 - y || minimal. if we
set the NA value of the qr.coef to 0, the 2-norm is 0 (the system is
solveable).

what I additionally expected is a solution b1 with || b1 || minimal
(under all solutions with ||Xb1 -y|| minimal). well,
the solution of qr has 2-norm sqrt(14), the solution with mpinv(X) has
2-norm sqrt(5).

with Moore-Penrose Xp, b2 <- Xp%*%y returns a solution which has minimal
2-norm || b2 ||. if we do not expect this from qr, the qr solution is
correct (but, is NA an admissible value for 0? splus returns 0 here).

Torsten

> --
> 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 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```