[Rd] follow-up on qr.coef bug (PR#8478)
sims@Princeton.EDU
sims at Princeton.EDU
Thu Jan 12 16:45:20 CET 2006
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.
--------------090308090600080800090200
Content-Type: text/x-vcard; charset=utf-8;
name="sims.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="sims.vcf"
begin:vcard
fn:Chris Sims
n:Sims;Chris
org:Princeton University;Department of Economics
adr:;;Fisher Hall;Princeton;NJ;08544-1021;USA
email;internet:sims at princeton.edu
tel;work:609 258 4033
tel;fax:609 258 6419
x-mozilla-html:FALSE
url:http://www.princeton.edu/~sims
version:2.1
end:vcard
--------------090308090600080800090200--
More information about the R-devel
mailing list