similar to: which to trust...princomp() or prcomp() or neither?

Displaying 20 results from an estimated 1000 matches similar to: "which to trust...princomp() or prcomp() or neither?"

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
1999 Sep 09
1
princomp
Peter, As I understand your Q. You probably have data that is similar to each other like stock Prices for all RHS variable. In that case the difference between corr and cov is not significant; however, if your RHS contains totally dissimilar variables it matters a great deal. If x1 income, x2 job type, x3 Education level, etc..., then taking cov of these variables would not be desireable
2007 Jun 27
1
Condensed PCA Results
Hello all, I'm currently using R to do PCA Analysis, and was wondering if anyone knew the specific R Code that could limit the output of the PCA Analysis so that you only get the Principal Component features as your output and none of the extraneous words or numbers that you don't want. If that was unclear, let me use linear regression as an example: "lm(y~x)" is the normal
2009 Dec 23
1
prcomp : plotting only explanatory axis arrows
Dear all, I have a very large dataset (1712351 , 20) and would like to plot only the arrows that represent the contribution of each variables. On the sample below I woild like to plot only the explanatory variables (Murder, Assault..) and not the sites. prcomp(USArrests) # inappropriate prcomp(USArrests, scale = TRUE) prcomp(~ Murder + Assault + Rape, data = USArrests, scale = TRUE)
2008 Nov 03
1
Input correlation matrix directly to princomp, prcomp
Hello fellow Rers, I have a no-doubt simple question which is turning into a headache so would be grateful for any help. I want to do a principal components analysis directly on a correlation matrix object rather than inputting the raw data (and specifying cor = TRUE or the like). The reason behind this is I need to use polychoric correlation coefficients calculated with John Fox's
2005 Sep 16
1
About princomp
Hi, I run the example for princomp for R211 I got the following error for biplot > ## The variances of the variables in the > ## USArrests data vary by orders of magnitude, so scaling is appropriate > (pc.cr <http://pc.cr> <- princomp(USArrests)) # inappropriate Erreur dans cov.wt(z) : 'x' must contain finite values only > princomp(USArrests, cor = TRUE) # =^=
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
2010 Jun 16
2
Accessing the elements of summary(prcomp(USArrests))
Hello again, I was hoping one of you could help me with this problem. Consider the sample data from R: > summary(prcomp(USArrests)) Importance of components: PC1 PC2 PC3 PC4 Standard deviation 83.732 14.2124 6.4894 2.48279 Proportion of Variance 0.966 0.0278 0.0058 0.00085 Cumulative Proportion 0.966 0.9933 0.9991 1.00000 How do I access the
2008 Feb 10
1
prcomp vs. princomp vs fast.prcomp
Hi R People: When performing PCA, should I use prcomp, princomp or fast.prcomp, please? thanks. Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
2012 Aug 23
1
Accessing the (first or more) principal component with princomp or prcomp
Hi , To my knowledge, there're two functions that can do principal component analysis, princomp and prcomp. I don't really know the difference; the only thing I know is that when the sample size < number of variable, only prcomp will work. Could someone tell me the difference or where I can find easy-to-read reference? To access the first PC using princomp:
2009 Oct 19
2
What is the difference between prcomp and princomp?
Some webpage has described prcomp and princomp, but I am still not quite sure what the major difference between them is. Can they be used interchangeably? In help, it says 'princomp' only handles so-called R-mode PCA, that is feature extraction of variables. If a data matrix is supplied (possibly via a formula) it is required that there are at least as many units as
2007 Aug 02
1
Streamlining Prcomp Data
Hello all, I was wondering if anyone knew how to get R to only spit out a certain portion of PRcomp data; namely, when I enter the following code, I get: > Summary(prcomp(USArrests)) Importance of components: PC1 PC2 PC3 PC4 Standard Deviation 83.732 14.212 6.489 2.483 Proportion of Variance 0.966 0.0278 0.0058 0.00085 Cumulative Proportion 0.966
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
2006 Jun 26
1
princomp and prcomp confusion
When I look through archives at https://stat.ethz.ch/pipermail/r-help/2003-October/040525.html I see this: Liaw, Andy wrote: >In the `Detail' section of ?princomp: > >princomp only handles so-called Q-mode PCA, that is feature extraction of >variables. If a data matrix is supplied (possibly via a formula) it is >required that there are at least as many units as variables. For
2006 Mar 25
1
Suggest patch for princomp.formula and prcomp.formula
Dear all, perhaps I am using princomp.formula and prcomp.formula in a way that is not documented to work, but then the documentation just says: formula: a formula with no response variable. Thus, to avoid a lot of typing, it would be nice if one could use '.' and '-' in the formula, e.g. > library(DAAG) > res <- prcomp(~ . - case - site - Pop - sex, possum)
2012 May 23
1
prcomp with previously scaled data: predict with 'newdata' wrong
Hello folks, it may be regarded as a user error to scale() your data prior to prcomp() instead of using its 'scale.' argument. However, it is a user thing that may happen and sounds a legitimate thing to do, but in that case predict() with 'newdata' can give wrong results: x <- scale(USArrests) sol <- prcomp(x) all.equal(predict(sol), predict(sol, newdata=x)) ## [1]
2011 Sep 09
2
prcomp: results with reversed sign in output?
Dear All, when I'm running a PCA with prcomp(USArrests, scale = TRUE) I get the right principal components, but with the wrong sign infront Rotation: PC1 PC2 PC3 PC4 Murder 0.5358995 -0.4181809 0.3412327 0.64922780 Assault 0.5831836 -0.1879856 0.2681484 -0.74340748 UrbanPop 0.2781909 0.8728062 0.3780158 0.13387773 Rape 0.5434321 0.1673186 -0.8177779 0.08902432 instead of PC1 PC2 PC3 PC4
2011 Jun 30
2
sdev value returned by princomp function (used for PCA)
Dear all, I have a question about the 'sdev' value returned by the princomp function (which does principal components analysis). On the help page for princomp it says 'sdev' is 'the standard deviations of the principal components'. However, when I calculate the principal components for the USArrests data set, I don't find this to be the case: Here is how I
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
2003 Jul 15
2
"na.action" parameter in princomp() (PR#3481)
Full_Name: Jerome Asselin Version: 1.7.1 OS: Red Hat Linux 7.2 Submission from: (NULL) (24.77.125.119) Setting the parameter na.action=na.omit should remove incomplete records in princomp. However this does not seem to work as expected. See example below. Sincerely, Jerome Asselin data(USArrests) princomp(USArrests, cor = TRUE) #THIS WORKS USArrests[1,3] <- NA princomp(USArrests, cor =