similar to: qr and Moore-Penrose

Displaying 20 results from an estimated 3000 matches similar to: "qr and Moore-Penrose"

2012 Mar 14
2
Moore-Penrose Generalized determinant?
Is there a function in R to calculate the generalized determinant of a singular matrix? - similar to the ginv() used to compute the generalized inverse. I can't seem to find any R related posts at all. Thanks in advance, Sean O'Riordain Trinity College Dublin -- View this message in context: http://r.789695.n4.nabble.com/Moore-Penrose-Generalized-determinant-tp4471629p4471629.html Sent
2008 Nov 03
1
qr() and Gram-Schmidt
Hi, Why the qr() produces a negative Q compared with Gram-Schmidt? (note example below, except Q[2,3]) Here is an example, I calculate the Q by Gram-Schmidt process and compare the output with qr.Q() a <- c(1,0,1) b <- c(1,0,0) c <- c(2,1,0) x <- matrix(c(a,b,c),3,3) ########################## # Gram-Schmidt ########################## A <- matrix(a,3,1) q1 <-
2016 Oct 24
3
typo or stale info in qr man
man for `qr` says that the function uses LINPACK's DQRDC, while it in fact uses DQRDC2. ``` The QR decomposition of the matrix as computed by LINPACK or LAPACK. The components in the returned value correspond directly to the values returned by DQRDC/DGEQP3/ZGEQP3 ```
2003 Jul 16
2
Is there a bug in qr(..,LAPACK=T)
The following snippet suggests that there is either a bug in qr(,LAPACK=T), or some bug in my understanding. Note that the detected rank is correct (= 2) using the default LINPACK qr, but incorrect (=3) using LAPACK. This is running on Linux Redhat 9.0, using the lapack library that comes with the Redhat distribution. I'm running R 1.7.1 compiled from the source. If the bug is in my
2006 Feb 20
2
Matrix / SparseM conflict (PR#8618)
Full_Name: David Pleydell Version: 2.2.1 OS: Debian Etch Submission from: (NULL) (193.55.70.206) There appears to be a conflict between the chol functions from the Matrix and the SparseM packages. chol() can only be applied to a matrix of class dspMatrix if SparseM is not in the path. with gratitude David > library(Matrix) > sm <- as(as(Matrix(diag(5) + 1), "dsyMatrix"),
2000 Mar 01
1
"is.qr" definition (PR#465)
Might it be possible to tighten the definition of "is.qr". I noticed that after I mistakenly typed example(lm) # make lm object named lm.D9 qr.Q(lm.D9) which exhausted the heap memory and produced two warning messages. As an object of class "lm" has a "qr" component, "is.qr" failed to detect that "lm.D9" was not a "qr" object. The
2010 Feb 17
2
qr test?
I am testing 'qr' with an admittedly contrived matrix and I am getting different results than I am from another package. The matrix that I am using is: x <- matrix(seq(.1, by=.1, length.out=12), 4) So the whole test is: x <- matrix(seq(.1, by=.1, length.out=12), 4) qr(x) And the output from 'R' is: $qr [,1] [,2] [,3] [1,] -0.5477226 -1.2780193
2012 Sep 07
1
Suggest adding a 'pivot' argument to qr.R
I suggest adding a 'pivot' argument to qr.R, to obtain columns in the same order as the original x, so that a <- qr(x) qr.Q(a) %*% qr.R(a, pivot=TRUE) returns x. -------------------------------------------------- # File src/library/base/R/qr.R qr.R <- function(qr, complete = FALSE, pivot = FALSE) { # Args: # qr: a QR decomposition, produced by qr() # complete:
2017 Jun 22
2
Unexpected behaviour of base::qr()$rank
2017-06-22 19:49 GMT+02:00 Uwe Ligges <ligges at statistik.tu-dortmund.de>: > On 22.06.2017 17:11, Bernd Funovits wrote: >> >> Hello, >> >> I experienced some unexpected behaviour while determining the rank of matrices (sometimes 1x1 matrices): >> base::qr(matrix(1e-20))$rank returns 1 (incorrect) >> base::qr(diag(c(1, 1e-20)))$rank returns 2
2017 Jun 22
1
Unexpected behaviour of base::qr()$rank
2017-06-22 20:31 GMT+02:00 Uwe Ligges <ligges at statistik.tu-dortmund.de>: > > > On 22.06.2017 20:09, I?aki ?car wrote: >> >> 2017-06-22 19:49 GMT+02:00 Uwe Ligges <ligges at statistik.tu-dortmund.de>: >>> >>> On 22.06.2017 17:11, Bernd Funovits wrote: >>>> >>>> >>>> Hello, >>>> >>>> I
2012 Jun 20
1
prcomp: where do sdev values come from?
In the manual page for prcomp(), it says that sdev is "the standard deviations of the principal components (i.e., the square roots of the eigenvalues of the covariance/correlation matrix, though the calculation is actually done with the singular values of the data matrix)." ?However, this is not what I'm finding. ?The values appear to be the standard deviations of a reprojection of
2017 Jun 22
0
Unexpected behaviour of base::qr()$rank
On 22.06.2017 20:09, I?aki ?car wrote: > 2017-06-22 19:49 GMT+02:00 Uwe Ligges <ligges at statistik.tu-dortmund.de>: >> On 22.06.2017 17:11, Bernd Funovits wrote: >>> >>> Hello, >>> >>> I experienced some unexpected behaviour while determining the rank of matrices (sometimes 1x1 matrices): >>> base::qr(matrix(1e-20))$rank returns 1
2001 Oct 18
0
General Matrix Inverse
Generalised Inverse: The Moore-Penrose Generalisied Inverse is probably better defined as a pseudo-Inverse that arises in solving least squares problems. Another well known pseudo-Inverse is the so-called Drazin pseudo-Inverse. If memory serves (and it's been 10-12 years!) it can be obtained via a diagonalisation. Anyway, I dare say Prof. Ripley (among others) probably has "all the
2001 Oct 18
1
AW: General Matrix Inverse
Thorsten is right. There is a direct formula for computing the Moore-Penrose inverse using the singular value composition of a matrix. This is incorporated in the following: mpinv <- function(A, eps = 1e-13) { s <- svd(A) e <- s$d e[e > eps] <- 1/e[e > eps] return(s$v %*% diag(e) %*% t(s$u)) } Hope it helps. Dietrich
2018 Jan 22
3
Inconsistent rank in qr()
Le 22/01/2018 ? 17:40, Keith O'Hara a ?crit?: > This behavior is noted in the qr documentation, no? > > rank - the rank of x as computed by the decomposition(*): always full rank in the LAPACK case. For a me a "full rank matrix" is a matrix the rank of which is indeed min(nrow(A), ncol(A)) but here the meaning of "always is full rank" is somewhat confusing. Does it
2011 Nov 21
0
Suggested improvement for src/library/base/man/qraux.Rd
Here is a modified version of qraux.Rd, an edited version of R-2.14.0/src/library/base/man/qraux.Rd This gives some details and an example for the case of pivoting. In this case, it is not true that X = QR; rather X[, pivot] = QR. It may save some other people bugs and time to have this information. Tim Hesterberg -------------------------------------------------- % File
2006 Jan 12
0
bug in qr.coef() and (therefore) in qr.solve (PR#8476)
[I thought I'd submitted this bug report some time ago, but it's never showed up on the bug tracking system, so I'm submitting again.] qr.solve() gives 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
2011 Aug 23
0
Matrix:::qr.qy and signature(qr = "sparseQR", y = "dgCMatrix")
> sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Matrix_0.999375-50 lattice_0.19-30 loaded via a namespace (and not attached): [1] grid_2.13.1
2012 Dec 03
1
qr.qy and qr.qty give an error message when y is integer and LAPACK=TRUE
With this example set.seed(123) A <- matrix(runif(40), nrow = 8) y <- 1:nrow(A) A.laqr <- qr(A, LAPACK=TRUE) both qr.qy(A.laqr,y) and qr.qty(A.laqr,y) give the respective error messages Error in qr.qy(A.laqr, y) : 'b' must be a numeric matrix Error in qr.qty(A.laqr, y) : 'b' must be a numeric matrix However when Lapack is not used as in A.liqr <- qr(A,
2018 May 19
1
Bug on qr.coef when qr is created by a zero matrix with colnames and all y equals zero
Dear maintainers, I'm reporting a bug in qr.coef that mishandles the colnames of matrix. A minimal reproducible example is as follows: x <- cbind(rep(0, 10), rep(0, 10)) y <- rep(0, 10) q <- qr.default(x) qr.coef(q, y) [1] NA NA If x has colnames, then qr.coef will end up with an error: x <- cbind(x1 = rep(0, 10), x2 = rep(0, 10)) y <- rep(0, 10) q <- qr.default(x)