Displaying 3 results from an estimated 3 matches for "qr_coef_cmplx".
2006 Jan 12
1
follow-up on qr.coef bug (PR#8478)
...sted 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(&quo...
2008 Nov 19
0
qr.coef and complex numbers - still busted for non-square case? (PR#13305)
...t;shipping" only handles square matrices.
In 2.8.0 [linux, windows, and os x] non-square complex arguments cause
an error.
> qr.solve(cbind(1:11,1),2*(20:30))
[1] 2 38
> qr.solve(cbind(as.complex(1:11),as.complex(1)),as.complex(2*(20:30)))
Error in coef[qr$pivot, ] <- .Call("qr_coef_cmplx", qr, y, PACKAGE = "base") :
number of items to replace is not a multiple of replacement length
If I change the section shown by context below from qr.coef as follows:
if (is.complex(qr$qr)) {
if (!is.complex(y))
y[] <- as.complex(y)
coef <- matrix(NA_complex_...
2006 Jan 12
0
bug in qr.coef() and (therefore) in qr.solve (PR#8476)
...s incorrect results when dealing with complex matrices or with qr objects that have been computed with LAPACK=TRUE, whenever the b argument has more than one column. This bug flows from qr.coef(), which has a similar problem. I believe the problem is the line
coef[qr$pivot, ] <- .Call("qr_coef_cmplx", qr, y, PACKAGE = "base")[1:p]
and the similar line in the LAPACK section of the qr.coef() code. As far as I can see, this line should read
coef <- .Call("qr_coef_cmplx", qr, y, PACKAGE = "base")[qr$pivot,]
With this change, qr.coef() gives correct result...