Displaying 20 results from an estimated 10000 matches similar to: "problem with eigen() function"
2008 Mar 03
1
Extracting data from Eigen function
Hi
I need to extract the data returned by Eigen to plot the eigenvectors.
However, when I try and eigv = eigen(covariance); it returns an object with
the matrices containing eigenvalues and vectors.. how can I extract the
eigenvector matrix from this??
When I try mat = eig["vectors"] it returns a matrix with the "$vectors"
string on top , how can I remove this?
code:
> eig
2005 Jul 04
1
eigen of a real pd symmetric matrix gives NaNs in $vector (PR#7987)
Full_Name: cajo ter Braak
Version: 2.1.1
OS: Windows
Submission from: (NULL) (137.224.10.105)
# I would like to attach the matrix C in the Rdata file; it is 50x50 and comes
from a geostatistical problem (spherical covariogram)
> rm(list=ls(all=TRUE))
> load(file= "test.eigen.Rdata")
> ls()
[1] "C" "eW"
>
> sym.check = max(abs(C - t(C))) # should
2007 May 23
1
Eigen values
Dear,
My problems are;
1. Simulate a P-variate multivariate data set (N by P)
2. Draw samples of size n from N (with or without replacement)
3. Obtain eigen values of the variance-covariance matrix of each
sample drawn in (2) above.
4. print out the matrix of eigen values as well as the identity of
sample generating them.
Thanks
---------------------------------
2000 Sep 29
2
non-ideal behavior in princomp/ not a feature but a bug
... I checked and Brian and I are both right (see bottom for prior mail
exchange).
Let me explain:
=============================================================
1. Indeed, in principle, princomp allows data matrices with are wider than
high.
Example:
> x1
[,1] [,2] [,3] [,4]
[1,] 1 1 2 2
[2,] 1 1 2 2
> princomp(x1)
Call:
princomp(x = x1)
Standard deviations:
2000 Sep 29
2
non-ideal behavior in princomp/ not a feature but a bug
... I checked and Brian and I are both right (see bottom for prior mail
exchange).
Let me explain:
=============================================================
1. Indeed, in principle, princomp allows data matrices with are wider than
high.
Example:
> x1
[,1] [,2] [,3] [,4]
[1,] 1 1 2 2
[2,] 1 1 2 2
> princomp(x1)
Call:
princomp(x = x1)
Standard deviations:
2005 Jul 04
0
eigen of a real pd symmetric matrix gives NaNs in $vector (PR#7989)
I would presume this is another manifestation of what I reported
(reproduced below) on 2003-12-01.
cajo.terbraak at wur.nl wrote:
>Full_Name: cajo ter Braak
>Version: 2.1.1
>OS: Windows
>Submission from: (NULL) (137.224.10.105)
>
>
># I would like to attach the matrix C in the Rdata file; it is 50x50 and comes
>from a geostatistical problem (spherical covariogram)
>
2010 Mar 19
1
Howto get unnormalized eigenvectors?
Hi,
I try to calculate the angle 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
2012 Aug 11
3
Problem when creating matrix of values based on covariance matrix
Hi,
I want to simulate a data set with similar covariance structure as my
observed data, and have calculated a covariance matrix (dimensions
8368*8368). So far I've tried two approaches to simulating data:
rmvnorm from the mvtnorm package, and by using the Cholesky
decomposition (http://www.cerebralmastication.com/2010/09/cholesk-post-on-correlated-random-normal-generation/).
The problem is
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.
2003 Dec 01
0
eigen anomaly
This is undoubtedly a bug, but I doubt that it is really down to R.
Synopsis: a certain matrix causes eigen(symmetric=TRUE)
to produce NaN's in some of the returned eigenvectors.
This happens using SuSe 8.2 Professional and the precompiled
R rpm (happens in both 1.8.1 and 1.7.1). I don't see it under
Windows.
To reproduce the bug:
The matrix (75 by 75, about 45K) is in
2004 Jun 25
2
Simulating from a Multivariate Normal Distribution Using a Correlation Matrix
Hello,
I would like to simulate randomly from a multivariate normal distribution using a correlation
matrix, rho. I do not have sigma. I have searched the help archive and the R documentation as
well as doing a standard google search. What I have seen is that one can either use rmvnorm in
the package: mvtnorm or mvrnorm in the package: MASS. I believe I read somewhere that the latter
was
2013 Jun 18
1
eigen(symmetric=TRUE) for complex matrices
R-3.0.1 rev 62743, binary downloaded from CRAN just now; macosx 10.8.3
Hello,
eigen(symmetric=TRUE) behaves strangely when given complex matrices.
The following two lines define 'A', a 100x100 (real) symmetric matrix
which theoretical considerations [Bochner's theorem] show to be positive
definite:
jj <- matrix(0,100,100)
A <- exp(-0.1*(row(jj)-col(jj))^2)
A's being
2004 Jan 15
1
Deprecate La.eigen?
I would like to deprecate La.eigen. It is used in a few packages
(ade4, fpc, gss, mvtnorm and smoothSurv on CRAN), but only in usages where
replacing `La.eigen' by `eigen' would call exactly the same code.
The reason for wanting to deprecate it is that little-used interfaces tend
to get overlooked, e.g. PR#5406, a report on eigen, needed to be applied
to La.eigen as well. We have also
2011 Feb 21
2
Segfaults of eigen
Hi,
with small matrices eigen works as expected:
> eigen(cbind(c(1,4),c(4,7)), only.values = TRUE)
$values
[1] 9 -1
$vectors
NULL
> eigen(cbind(c(1,4),c(4,7)))
$values
[1] 9 -1
$vectors
[,1] [,2]
[1,] 0.4472136 -0.8944272
[2,] 0.8944272 0.4472136
> eigen(cbind(c(1,-1),c(1,-1)))
$values
[1] -3.25177e-17+1.570092e-16i -3.25177e-17-1.570092e-16i
$vectors
2007 Mar 16
1
error code 5 from Lapack routine 'dsyevr'
While using the rmvnorm function, I get the error:
Error in eigen(sigma, sym = TRUE) : error code 5 from Lapack routine
'dsyevr'
The same thing happens when I try the eigen() function on my covariance
matrix. The matrix is a symmetric 111x111 matrix. Well, it is almost
symmetric; there are slight deviations from symmetry (the largest is
3e-18). I have this in an MCMC loop, and it
2008 Aug 22
1
Retrieving sample points
Hi everyone. My problem is about multivariate analysis. Given a multivariate data X, of dimension (n by p), n is the number of observations while p is the number of variables. I wanted a sample of size p+1 that will have its product of the eigen values of the covariance matrix to be the minimum among all the possible samples (n combination (p+1)). I have written a syntax with worked well, but the
2016 Apr 21
1
EIGEN VECTOR PROBLEM
Dear Sir,
I am an R user.
I am in problem to find eigen vectors in R.
For the following matrix eigen vectors are not right. I can not understand
why??
For the 1st eigen value and 2nd eigen value are same, but the eigen vectors
are not same.
*HOW CAN I RESOLVE THE PROBLEM??*
*>c=matrix(c(1,0,0,1,2,0,-3,5,2),nrow=3,byrow=T)> eigen(c)$values[1] 2 2
1$vectors [,1] [,2]
2005 Feb 17
1
eigen vector question
Sorry to bother everyone, but I've looked in all of the help files and
manuals I have and I can't find the answer to this question. I'm doing
principle component analysis by calculating the eigen vectors of a
correlation matrix that I have that is composed of 21 parameters. I have
the eigen vectors and their values that R produced for me but I'm not sure
how to tell which
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,
2003 Nov 09
1
weird behaviour of eigen()
I'm using R 1.7.1 under linux redhat
it seems that the eigen values produced by eigen() do not follow
a consistant order; I mean either ascending or discending
e.g
for one system:
eigenV<-eigen(V)
> print(eigenV$values)
[1] -7.706828e+13 -4.702980e+13 -3.267579e+13 -1.701297e+13
-8.041677e+12
[6] -5.707311e+12 -5.053941e+12 -4.774652e+12 -4.280423e+12
-3.798905e+12