search for: qr_coef_real

Displaying 4 results from an estimated 4 matches for "qr_coef_real".

2006 Jan 12
1
follow-up on qr.coef bug (PR#8478)
...e 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 cas...
2009 Jun 17
1
Inverting a square matrix using solve() with LAPACK=TRUE (PR#13762)
Full_Name: Ravi Varadhan Version: 2.8.1 OS: Windows Submission from: (NULL) (162.129.251.19) Inverting a matrix with solve(), but using LAPACK=TRUE, gives erroneous results: Here is an example: hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") } h5 <- hilbert(5) hinv1 <- solve(qr(h5)) hinv2 <- solve(qr(h5, LAPACK=TRUE)) all.equal(hinv1, hinv2) #
2009 Jun 18
0
Inverting a square matrix using solve() with LAPACK=TRUE (PR#13765)
...an > Version: 2.8.1 > OS: Windows > Submission from: (NULL) (162.129.251.19) > > > Inverting a matrix with solve(), but using LAPACK=TRUE, gives erroneous > results: Thanks, but there seems to be a much easier fix. Inside coef.qr, we have coef[qr$pivot, ] <- .Call("qr_coef_real", qr, y, PACKAGE = "base")[seq_len(p)] which should be [seq_len(p),] (otherwise, in the matrix case, the RHS will recycle only the 1st p elements, i.e., the 1st column). > > Here is an example: > > hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, &q...
2009 Jun 18
1
Inverting a square... (PR#13762)
...rsion: 2.8.1 > OS: Windows > Submission from: (NULL) (162.129.251.19) >=20 >=20 > Inverting a matrix with solve(), but using LAPACK=3DTRUE, gives erroneo= us > results: Thanks, but there seems to be a much easier fix. Inside coef.qr, we have coef[qr$pivot, ] <- =2ECall("qr_coef_real", qr, y, PACKAGE =3D "base")[seq_len(p)] which should be [seq_len(p),] (otherwise, in the matrix case, the RHS will recycle only the 1st p elements, i.e., the 1st column). >=20 > Here is an example: >=20 > hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1,...