similar to: prcomp problem

Displaying 20 results from an estimated 5000 matches similar to: "prcomp problem"

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
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 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 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 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
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"
2011 Nov 04
1
How to use 'prcomp' with CLUSPLOT?
Hello, I have a large data set that has more columns than rows (sample data below). I am trying to perform a partitioning cluster analysis and then plot that using pca. I have tried using CLUSPLOT(), but that only allows for 'princomp' where I need 'prcomp' as I do not want to reduce my columns. Is there a way to edit the CLUSPLOT() code to use 'prcomp', please? #
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
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
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]
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
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
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
2004 Mar 17
0
mva :: prcomp
Dear R-list users, I'm new to principal components and factor analysis. I thought this method can be very useful for me to find relationships between several variables (which I know there is, only don't know which variables exactly and what kind of relation), so as a structure detection method. Now, I'm experimenting with the function prcomp from the mva package. In my source code
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
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
2011 May 11
0
stats:::biplot.prcomp: Scaling, typo in the help file?
Dear all, >From the documentation of biplot.prcomp: scale: The variables are scaled by 'lambda ^ scale' and the observations are scaled by 'lambda ^ (1-scale)' where 'lambda' are the singular values as computed by 'princomp'. >From the source code of prcomp: lam <- x$sdev[choices] n <- NROW(scores) lam <- lam * sqrt(n)
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
2009 Jan 19
3
bootstrapped eigenvector method following prcomp
G'Day R users! Following an ordination using prcomp, I'd like to test which variables singnificantly contribute to a principal component. There is a method suggested by Peres-Neto and al. 2003. Ecology 84:2347-2363 called "bootstrapped eigenvector". It was asked for that in this forum in January 2005 by J?r?me Lema?tre: "1) Resample 1000 times with replacement entire
2005 Nov 18
1
pr[in]comp: predict single observation when data has colnames (PR#8324)
To my knowledge, this has not been reported previously, and doesn't seem to have been changed in R-devel or R-patched. If M is a matrix with coloumn names, and mod <- prcomp(M) # or princomp then predicting a single observation (row) with predict() gives the error Error in scale.default(newdata, object$center, object$scale) : length of 'center' must equal the number of