Re: [Rd] follow-up on qr.coef bug (PR#8478)

From: <>
Date: Thu 12 Jan 2006 - 16:21:38 GMT

It certainly _was_ there, in incoming as PR#8476, and also in the R-devel archives.

BTW, you have not given the minimal information required, e.g. the R version. The pivot logic _is_ correct (your patch was broken), but there was a problem with multiple RHSs, now fixed.

On Thu, 12 Jan 2006 wrote:

> This is a multi-part message in MIME format.
> --------------090308090600080800090200
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> The bug I submitted yesterday (It's not entered in the bug data base, so
> I have no ID for it) included a suggested fix that
> is not correct. It worked for the examples I gave because there was no
> pivoting in fact, or only pivot permutations that were
> idempotent. A correction that works in general on the examples I gave
> makes these two changes in qr.coef():
> ## coef[qr$pivot, ] <- .Call("qr_coef_cmplx", qr, y, PACKAGE =
> "base")[1:p]
> coef[qr$pivot,] <- .Call("qr_coef_cmplx", qr, y, PACKAGE =
> "base")[1:p,]
> ##coef[qr$pivot,] <- .Call("qr_coef_real", qr, y, PACKAGE =
> "base")[1:p]
> coef[qr$pivot,] <- .Call("qr_coef_real", qr, y, PACKAGE =
> "base")[1:p,]
> I'm not sure why the [1:p,] on the right is needed. For my examples, it
> works without this extraction operation, but maybe there is some case in
> which the output of qr_coef_real or qr_coef_cmplx could have more than p
> rows.

Read the C code: B is a copy of Bin (y) and so no, it cannot happen any more (it could in an earlier version).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Fri Jan 13 03:27:19 2006

This archive was generated by hypermail 2.1.8 : Thu 12 Jan 2006 - 20:02:08 GMT