similar to: non-ideal behavior in princomp/ not a feature but a bug

Displaying 20 results from an estimated 6000 matches similar to: "non-ideal behavior in princomp/ not a feature but a bug"

2000 Sep 28
1
non-ideal behavior in princomp
This problem is not limited to R, but R is one of the packages in which it arises. princomp is a nice function which creates an object for which inspection methods have been written. Unfortunately, princomp does not admit cases in which the x matrix is wider than high (i. e. more variables than observations). Such cases are typical in spectroscopy and related disciplines. It would be nice if the
2000 Jan 31
1
Feature requests for princomp(.) : Allow cor() specifications
(all in subject). If I want to do a PC analysis in a situation with missing data, I may want to have same flexibility as with "cor(.)", e.g., I may want princomp(x, ..., use.obs = "pairwise.complete") Actually, I may want even more flexibility. Currently, princomp(.) has if (cor) cv <- get("cor", envir = .GlobalEnv)(z) else cv <-
2003 Apr 11
2
princomp with not non-negative definite correlation matrix
$ R --version R 1.6.1 (2002-11-01). So I would like to perform principal components analysis on a 16X16 correlation matrix, [princomp(cov.mat=x) where x is correlation matrix], the problem is princomp complains that it is not non-negative definite. I called eigen() on the correlation matrix and found that one of the eigenvectors is close to zero & negative (-0.001832311). Is there any way
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
1998 Aug 26
0
prcomp & princomp - revised
My previous post about prcomp and princomp was done in some haste as I had long ago indicated to Kurt that I would try to have this ready for the June release, and it appeared that I would miss yet another release. I also need to get it out before it becomes hopelessly buried by other work. Brian Ripley kindly pointed out some errors, and also pointed out that I was suggesting replacing some
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
2003 May 06
2
R vs SPSS output for princomp
Hi, I am using R to do a principal components analysis for a class which is generally using SPSS - so some of my question relates to SPSS output (and this might not be the right place). I have scoured the mailing list and the web but can't get a feel for this. It is annoying because they will be marking to the SPSS output. Basically I'm getting different values for the component
2002 Oct 03
2
Error in princomp?
Hello! When using princomp() for principal components analysis, the resulting loadings matrix differs between R and the output from other programs (S-plus and SAS) The difference is that the sign of some columns in the loadings matrix. The absolute values, however, are the same. This sign difference also exists when comparing the princomp() results with the manually calculated eigen vectors using
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
2005 Apr 08
1
Princomp$Scores
Hi all, I was hoping that someone could verify this for me- when I run princomp() on a matrix, it is my understanding that the scores slot of the output is a measure of how well each row correlates (for lack of a better word) with each principal component. i.e. say I have a 300x6 log2 scaled matrix, and I run princomp(). I would get back a $scores slot that is also 300x6, where each value
2009 Feb 13
4
PCA functions
Hi All, would appreciate an answer on this if you have a moment; Is there a function (before I try and write it !) that allows the input of a covariance or correlation matrix to calculate PCA, rather than the actual data as in princomp() Regards Glenn [[alternative HTML version deleted]]
2006 Jul 16
1
princomp and eigen
Consider the following output [R2.2.0; Windows XP] > set.seed(160706) > X <- matrix(rnorm(40),nrow=10,ncol=4) > Xpc <- princomp(X,cor=FALSE) > summary(Xpc,loadings=TRUE, cutoff=0) Importance of components: Comp.1 Comp.2 Comp.3 Comp.4 Standard deviation 1.2268300 0.9690865 0.7918504 0.55295970 Proportion of Variance 0.4456907 0.2780929
2002 Apr 10
4
Principal Component analysis question
I have a question about princomp(mva) that I hope isn't too newbie. I used the sample data from Table 1.1 in "Manly (1986/1994) Multivariate Statistical Methods: a primer. Chapman and Hall" on sparrow body measurements. I rescaled the data to mean 0 and SD 1, and the covariance matrix is: V1 V2 V3 V4 V5 V1 1.0000000 0.7349642 0.6618119
2012 Apr 25
1
pca biplot.princomp has a bug?
x=rmvnorm(2000, rep(0, 6), diag(c(5, rep(1,5)))) x=scale(x, center=T, scale=F) pc <- princomp(x) biplot(pc) There are a bunch of red arrows plotted, what do they mean? I knew that the first arrow labelled with "Var1" should be pointing the most varying direction of the data-set (if we think them as 2000 data points, each being a vector of size 6). I also read from
2007 May 10
1
A simple question about PRINCOMP
Hi, I just wonder if this is a rounding error by the princomp command in R. Although this does not make much sense, using a hypothetical dataset, a, a<-matrix(runif(1000),100,10) I did PCA with the princomp, and compared it with the results estimated with the eigen and the prcomp commands. And I found some differences in the results: opposite signs in the loadings; slight differences in
2011 May 16
2
princomp and eigen
Hi. I was comparing the components from princomp's loadings and the eigen given the same input. I found that the sign of componenets (+/-) are opposite between the two components (from princmop and eigen) but the magnitudes are identical. Why? Thanks! [[alternative HTML version deleted]]
2005 Mar 26
5
PCA - princomp can only be used with more units than variables
Hi all: I am trying to do PCA on the following matrix. N1 N2 A1 A2 B1 B2 gene_a 90 110 190 210 290 310 gene_b 190 210 390 410 590 610 gene_c 90 110 110 90 120 80 gene_d 200 100 400 90 600 200 >dataf<-read.table("matrix") >
2009 Jan 14
1
Adressing list-elements
Dear all, I'm using R 2.8.1 under Vista. I programmed a Simulation with the code enclosed at the end of the eMail. After the simulation I want to analyse the columns of the single simulation-runs, i.e. e.g. Simulation[[1]][,1] sth. like that but I cannot address these columns... Can anybody please help? Best, Thomas ############################ CODE ############################
2009 Mar 08
2
prcomp(X,center=F) ??
I do not understand, from a PCA point of view, the option center=F of prcomp() According to the help page, the calculation in prcomp() "is done by a singular value decomposition of the (centered and possibly scaled) data matrix, not by using eigen on the covariance matrix" (as it's done by princomp()) . "This is generally the preferred method for numerical accuracy"
2003 Aug 08
1
covmat argument in princomp() (PR#3682)
R version: 1.7.1 OS: Red Hat Linux 7.2 When "covmat" is supplied in princomp(), the output value "center" is all NA's, even though the input matrix was indeed centered. I haven't read anything about this in the help file for princomp(). See code below for an example: pc2$center is all NA's. Jerome Asselin x <- rnorm(6) y <- rnorm(6) X <- cbind(x,y)