search for: eispack

Displaying 20 results from an estimated 34 matches for "eispack".

2006 Mar 03
1
NA in eigen()
...to get an eigen decomposition of a square, symmetric matrix. For some reason, I am getting a column in my eigen vectors (the 52nd column out of 601) that is a column of all NAs. I am using the option, symmetric=T for eigen. I just discovered that I do not get this behavior when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is (up to rounding error) a vector of all zeros except for -0.6714 and +0.6714 in two locations. The eigenvalues (which are the same with either one) has the 52nd eigenvalue being exactly 19. I also do not have the NA problem if I choose symmetric=F. M...
2006 Jan 02
1
R crash with complex matrix algebra when using EISPACK=TRUE
Dear subscribers of R-devel I am experiencing that R crashes (further details are given below) in some complex matrix calculations when EISPACK=TRUE has been specified in eigen(). I discovered the behaviour some months ago just after the release of R-2.2.0, and it has been lying on my desk since. I apologise for not having nailed the problem down to a simple function call, but I thought I should better report the problem now instead of w...
2002 Jul 09
1
EISPACK symmetric matrix eigenvalue routines
Can someone confirm that the EISPACK routines for eigenvalues of symmetric matrix are in base R. They seem to be, but I can't seem to locate where they are in the src tree. Thanks. Chong Gu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hor...
2005 May 01
2
eigen() may fail for some symmetric matrices, affects mvrnorm()
...nes with small errors of the magnitude 1e-17 or so) were affected but then we encountered matrices that were perfectly symmetric but eigen still generated NaNs when symmetric=TRUE. I wrote a trivial patch to mvrnorm to detect this problem and to recompute the eigenvalues with symmetric=TRUE and EISPACK=TRUE. This seems to work. symmetric=FALSE also seems to work, but is somewhat slower. If you use mvrnorm then you may want to try this. Details and the patch are on my web page, along with one example of a problematic symmetric matrix (to be loaded with the 'load' function). The NaNs s...
1997 May 18
2
R-alpha: Eigenvalue Computation Query
I have been looking at the "eigen" function and have reintroduced the ability to compute (right) eigenvalues and vectors for non-symmetric matrices. I've also made "eigen" complex capable. The code is based on the eispack entry points RS, RG, CH, CG (which is what S appears to use too). The problem with both the S and R implementations is that they consume huge amounts of memory. Some of this is due to purely ".Fortran" overhead, which I think I can cure. But some of the bloat is due to the inclusion of...
2007 Mar 18
1
eigen returns NAs from a real matrix
...States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base" Using EISPACK does NOT return NAs: > sum(is.na(eigen(eigenBug, EISPACK=TRUE)$vectors)) [1] 0 I traced the problem to the following line in 'eigen': z <- if (!complex.x) .Call("La_rs", x, only.values, PACKAGE = "base") Comments?...
2006 Mar 28
2
R crashes during 'eigen'
..., R crashes (i.e. it stops responding to any input). I've tried it with different versions of R (2.1.1, 2.2.0, 2.2.1) - all with crashing as result. What I did before the crash was: M <- as.matrix(read.table("thematrix",header=T)) eigen(M) If, instead of eigen(M), I use eigen(M, EISPACK=T), R doesn't crash. So, I know a workaround my problem, but still don't understand why R crashes. Could anyone explain this? In case someone wants to download my matrix to see where it goes wrong, it can be downloaded from http://mcs.open.ac.uk/cja235/thematrix (warning: obviously, R might...
2004 Jul 27
4
Problems with Lapack's eigen() on 64-bit
...1, 1:3)) $values [1] 5.7015621 1.0000000 -0.7015621 $vectors [,1] [,2] [,3] [1,] 0.4877939 -0.7181217 -0.9576161 [2,] 0.6172751 -0.3893848 0.2036804 [3,] 0.6172751 0.5767849 0.2036804 which is simply plainly wrong and eigen(cbind(1, 3:1, 1:3), EISPACK=TRUE) gives the correct eigen values c(5, 1, 0) and corresponding eigenvectors. IIRC, we've already dealt with a Lapack problem, and that workaround (built into R-devel's Makefiles) has been to use -ffloat-store for the compilation of src/modules/lapack/dlamc.f ---------- Thank you for...
2010 Oct 20
0
[Rpy] "lapack routines cannot be loaded" in Ubuntu Linux 9.10
...mputed from the PEP 3118 | > buffer format string does not match the actual item size. | > return array(a, dtype, copy=False, order=order) | > .getbuffer | > .getbuffer | > .................................................Error in function (x, | > symmetric, only.values = FALSE, EISPACK = FALSE) : | > lapack routines cannot be loaded | > In addition: Warning message: | > In function (x, symmetric, only.values = FALSE, EISPACK = FALSE) : | > unable to load shared object '/usr/local/lib/R/modules//lapack.so': | > libRlapack.so: cannot open shared objec...
2008 Jul 17
2
Sampling distribution (PDF & CDF) of correlation
...it is relatively fast, an analytic solution would obviously be optimal. get.cors <- function(i, x, y, N){ end=i*N .Internal(cor(x[(end-N+1):end] ,y[(end-N+1):end] ,TRUE ,FALSE )) } get.r.dist <- function(N, rho, it){ Sigma=matrix(c(1,rho,rho,1),2,2) eS = eigen(Sigma, symmetric = TRUE, EISPACK = TRUE) ev = eS$values fact = eS$vectors %*% diag(sqrt(pmax(ev, 0)), 2) Z = rnorm(2 * N * it) dim(Z) = c(2, N * it) Z = t(fact %*% Z) x = Z[, 1] y = Z[, 2] r = sapply(1:it ,get.cors,x, y, N) return(r) } #Run 1e3 monte carlo iterations, where each obtains the correlation # of 10 pairs of...
2003 Apr 18
1
Problem with eigen() and LAPACK
Hi all, when testing the new improvements in the new 1.7.0-version I stumbled over the following: >eigen(matrix(c(0,.3,2,.9),2,2)) Error in eigen(matrix(c(0,.3,2,.9),2,2)) : LAPACK routine DGEEV gave error code -13 >eigen(matrix(c(0,.3,2,.9),2,2),EISPACK=TRUE) $values [1] 1.3458236 -0.4458236 $vectors [,1] [,2] [1,] -1.1436890 -0.9760443 [2,] -0.7696018 0.2175718 My R-version [1] "R version 1.7.0, 2003-04-16", running on Debian PC. Anyone who has a clue why LAPACK refuses to solve the eigenvalues? Thanks, Hans G...
2010 Mar 19
1
Howto get unnormalized eigenvectors?
...between two first eigenvectors of different covariance matrices of biological phenotypic traits for different populations. My issue here is, that all possibilities to do so seem to normalize the eigenvectors to length 1. Although the helpfile of eigen() states, that using eigen(, symmetric = FALSE, EISPACK =TRUE) skips normalization this is (I guess) not applicable for me as my matrices are symmetric. x<-eigen(cov(population1))$vectors[,1] y<-eigen(cov(population2))$vectors[,1] angle (in degree): ((acos((x%*%y)/(sqrt(x%*%y)*sqrt(y%*%y))))*180)/pi Thus by using normalized vectors, the divisor...
2012 Mar 09
1
Eigenvalue calculation of sparse matrices
...rse matrices and I remember some specific functionalities in MATLAB for sparse matrices, I started a research how to optimize the calculation of eigenvalues of a sparse matrix. The function eigen itself works with the LAPACK library which has no special handling for sparse matrices, same for the EISPACK library. The ARPACK library is capable to work with sparse matrices but I couldn't find any useful R package using ARPACK. The Matrix package can handle sparse matrices but has no further useful functionalities (concerning my tasks). Does one of you have any advice how to optimize the eigen...
2009 Apr 24
1
the puzzle of eigenvector and eigenvalue
Dear all I am so glad the R can provide the efficient calculate about eigenvector and eigenvalue. However, i have some puzzle about the procedure of eigen. Fristly, what kind of procedue does the R utilize such that the eigen are obtained? For example, A=matrix(c(1,2,4,3),2,2) we can define the eigenvalue lamda, such as det | 1-lamda 4 | =0 | 2 3-lamda | then
1997 Aug 25
2
R-alpha: eigen and batch
...quit that way interactively. The problem is that it is ignored in batch. eigen: The crash occurs on my 586 running Red Hat Linux 2.0.27 but not on my son's 486 running SLackware Linix 2.0.29. We both have the same most recent libraries installed (libc, libm, etc). I started looking in the eispack C code and traced down the problem. In three of the four Fortran calls in eigen, (ch,rs,cg but not rg), the same vector (vals) is used for the return eigenvalues as for two or three temporary workspace vectors. This is risky programming at any time and leads to a catastrophe with a 586 where severa...
2003 Jun 09
1
understanding eigen(): getting non-normalized eigenvectors
...[,1] [,2] V1 0.7714286 -0.2571429 V2 -0.4224490 0.1408163 Calculating eigen(A) "by hand" gives the eigenvectors (example from Backhaus, multivariate analysis): 0.77143 and 0.25714 -0.42245 0.14082 but even eigen(solve(Derror)%*%Dtreat, symmetric = FALSE, EISPACK =TRUE) which according to ?eigen should not necessarily give the normalized eigenvectors give the vectors (such as eigen()): $vectors [,1] [,2] [1,] 0.8770963 0.3162278 [2,] -0.4803146 0.9486833 -> how can I replicate the result we get "by hand" (I ask because for s...
2008 Feb 07
1
.fortran code
Hi, I need to look/understand what the ".fortran()" doing in say, the source code of the "eigen" command. How do I look into this? Thanks, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2003 Nov 29
1
eigen of matrix of Inf hangs (PR#5406)
Full_Name: Patrick Burns Version: 1.8.1 OS: Windows 2000 Submission from: (NULL) (81.129.3.151) The command: eigen(matrix(Inf, 2, 2)) causes version 1.8.1 to hang in both Windows 2000 and SuSe 8.2. (Hang defined as apparently needing to kill the process in order to get a prompt back.) This is similar to bug #4366 where the same command used NaN instead of Inf.
2005 Apr 25
1
The eigen function
I'm using R version 2.0.1 on a Windows 2000 operating system. Here is some actual code I executed: > test [,1] [,2] [1,] 1000 500 [2,] 500 250 > eigen(test, symmetric=T)$values [1] 1.250000e+03 -3.153033e-15 > eigen(test, symmetric=T)$values[2] >= 0 [1] FALSE > eigen(test, symmetric=T, only.values=T)$values [1] 1250 0 > eigen(test, symmetric=T,
2011 Jan 22
1
faster mvrnorm alternative
Hello, does anybody know another faster function for random multivariate normal variable simulation? I'm using mvrnorm, but as profiling shows, my algorithm spends approximately 50 % in executing mvrnorm function. Maybe some of you knows much faster function for multivariate normal simulation? I would be very gratefull for advices. -- View this message in context: