Displaying 20 results from an estimated 3000 matches similar to: "bug in prcomp (PR#8994)"
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
2013 Mar 14
2
Same eigenvalues but different eigenvectors using 'prcomp' and 'principal' commands
Dear all,
I've used the 'prcomp' command to
calculate the eigenvalues and eigenvectors of a matrix(gg).
Using the command 'principal' from the
'psych' packageĀ I've performed the same exercise. I got the same
eigenvalues but different eigenvectors. Is there any reason for that
difference?
Below are the steps I've followed:
1. PRCOMP
#defining the matrix
2004 Jan 15
2
prcomp scale error (PR#6433)
Full_Name: Ryszard Czerminski
Version: 1.8.1
OS: GNU/Linux
Submission from: (NULL) (205.181.102.120)
prcomp(..., scale = TRUE) does not work correctly:
$ uname -a
Linux 2.4.20-28.9bigmem #1 SMP Thu Dec 18 13:27:33 EST 2003 i686 i686 i386
GNU/Linux
$ gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
> a <- matrix(rnorm(6), nrow = 3)
> sum((scale(a %*% svd(cov(a))$u, scale
2016 Mar 22
3
Memory usage in prcomp
Hi All:
I am running prcomp on a very large array, roughly [500000, 3650]. The array itself is 16GB. I am running on a Unix machine and am running ?top? at the same time and am quite surprised to see that the application memory usage is 76GB. I have the ?tol? set very high (.8) so that it should only pull out a few components. I am surprised at this memory usage because prcomp uses the SVD
2016 Mar 22
3
Memory usage in prcomp
Hi All:
I am running prcomp on a very large array, roughly [500000, 3650]. The array itself is 16GB. I am running on a Unix machine and am running ?top? at the same time and am quite surprised to see that the application memory usage is 76GB. I have the ?tol? set very high (.8) so that it should only pull out a few components. I am surprised at this memory usage because prcomp uses the SVD
2009 Nov 25
1
which to trust...princomp() or prcomp() or neither?
According to R help:
princomp() uses eigenvalues of covariance data.
prcomp() uses the SVD method.
yet when I run the (eg., USArrests) data example and compare with my own
"hand-written" versions of PCA I get what looks like the opposite.
Example:
comparing the variances I see:
Using prcomp(USArrests)
-------------------------------------
Standard deviations:
[1] 83.732400 14.212402
2006 May 17
2
prcomp: problem with zeros? (PR#8870)
Full_Name: Juha Heljoranta
Version: R 2.1.1 (2005-06-20)
OS: Gentoo Linux
Submission from: (NULL) (88.112.29.250)
prcomp has a bug which causes following error
Error in svd(x, nu = 0) : infinite or missing values in 'x'
on a valid data set (no Infs, no missing values). The error is most likely
caused by the zeros in data.
My code and temporary workaround:
m = matrix(...
...
2010 Nov 10
2
prcomp function
Hello,
I have a short question about the prcomp function. First I cite the
associated help page (help(prcomp)):
"Value:
...
SDEV 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).
ROTATION the matrix of variable loadings
2009 Mar 10
1
Using napredict in prcomp
Hello all,
I wish to compute site scores using PCA (prcomp) on a matrix with
missing values, for example:
Drain Slope OrgL
a 4 1 NA
b 2.5 39 6
c 6 8 45
d 3 9 12
e 3 16 4
...
Where a,b... are sites.
The command
> pca<-prcomp(~ Drain + Slope + OrgL, data = t, center = TRUE, scale =
TRUE, na.action=na.exclude)
works great, and from
2000 Dec 01
1
simple (NEWBIE) question re: prcomp or princomp
Hi,
I am a new user of R, and apologize beforehand for the simplistic nature of this question:
I ran prcomp on a data set with 4 variables, and am able to see the summary information (variance contribution, rotation matrix, plots, etc.). However, I'd also like to extract the actual values of the principal components (PC) corresponding to each sample. I've looked in the help, on-line
2004 Mar 04
1
prcomp: error code 1 from Lapack routine dgesdd
Dear all
I have a big matrix of standardized values (dimensions 285x5829) and R
fails to calculate
the principal components using prcomp() with the following error message:
pc <- prcomp(my.matrix)
Error in La.svd(x, nu, nv, method) : error code 1 from Lapack routine
dgesdd
Is the matrix too big? I'm using R-1.8.1 under Unix (Solaris8) and
Linux(Suse 8.2). I tried to
perform a principal
1998 Apr 24
1
Warning: ignored non function "scale"
I've been working on a revised version of prcomp and princomp. Below is my
current draft of prcomp, which is marginally different from V&R. I've added
center and scale as optional arguments. However, scale causes the following:
> zi _ prcomp(iris[,,2])
Warning: ignored non function "scale"
because scale is both a variable and a function. Is there any way to avoid this
2012 Oct 31
3
Cannot rescale a constant/zero column error.
I am trying to run the R Script below, I have actually simplified it to just
this part that is causing issues. When I run this script I continue to get
an error that says "cannot rescale a constant/zero column to a unit
variance". I cannot figure out what is going on here. I have stripped down
my data file so it is more manageable so I can try to figure this out.
The data.txt file
2009 Nov 09
4
prcomp - principal components in R
Hello, not understanding the output of prcomp, I reduce the number of
components and the output continues to show cumulative 100% of the
variance explained, which can't be the case dropping from 8 components
to 3.
How do i get the output in terms of the cumulative % of the total
variance, so when i go from total solution of 8 (8 variables in the data
set), to a reduced number of
2016 Mar 24
3
summary( prcomp(*, tol = .) ) -- and 'rank.'
Following from the R-help thread of March 22 on "Memory usage in prcomp",
I've started looking into adding an optional 'rank.' argument
to prcomp allowing to more efficiently get only a few PCs
instead of the full p PCs, say when p = 1000 and you know you
only want 5 PCs.
(https://stat.ethz.ch/pipermail/r-help/2016-March/437228.html
As it was mentioned, we already
2008 Jan 04
1
PCA error: svd(x, nu=0) infinite or missing values
Hi,
I am trying to do a PCA on my data but I keep getting the error message
svd(x, nu=0) infinite or missing values
>From the messages posted on the subject, I understand that the NAs in my
data might be the problem, but I thought na.omit would take care of that.
Less than 5% of my cells are missing data. However, the NAs are not
regularly distributed across my matrix: certain cases and
2005 Aug 03
3
prcomp eigenvalues
Hello,
Can you get eigenvalues in addition to eigevectors using prcomp? If so how?
I am unable to use princomp due to small sample sizes.
Thank you in advance for your help!
Rebecca Young
--
Rebecca Young
Graduate Student
Ecology & Evolutionary Biology, Badyaev Lab
University of Arizona
1041 E Lowell
Tucson, AZ 85721-0088
Office: 425BSW
rlyoung at email.arizona.edu
(520) 621-4005
2000 Oct 03
3
prcomp compared to SPAD
Hi !
I've used the example given in the documentation for the prcomp function
both in R and SPAD to compare the results obtained.
Surprisingly, I do not obtain the same results for the coordinates of
the principal composantes with these two softwares.
using USArrests data I obtain with R :
> summary(prcomp(USArrests))
Importance of components:
PC1 PC2
2004 Nov 03
2
Princomp(), prcomp() and loadings()
In comparing the results of princomp and prcomp I find:
1. The reported standard deviations are similar but about 1% from
each other, which seems well above round-off error.
2. princomp returns what I understand are variances and cumulative
variances accounted for by each principal component which are
all equal. "SS loadings" is always 1.
3. Same happens
2016 Mar 24
3
summary( prcomp(*, tol = .) ) -- and 'rank.'
I agree with Kasper, this is a 'big' issue. Does your method of taking only
n PCs reduce the load on memory?
The new addition to the summary looks like a good idea, but Proportion of
Variance as you describe it may be confusing to new users. Am I correct in
saying Proportion of variance describes the amount of variance with respect
to the number of components the user chooses to show? So