similar to: PCA and % variance explained

Displaying 20 results from an estimated 2000 matches similar to: "PCA and % variance explained"

2004 Jun 28
3
How to determine the number of dominant eigenvalues in PCA
Dear All, I want to know if there is some easy and reliable way to estimate the number of dominant eigenvalues when applying PCA on sample covariance matrix. Assume x-axis is the number of eigenvalues (1, 2, ....,n), and y-axis is the corresponding eigenvalues (a1,a2,..., an) arranged in desceding order. So this x-y plot will be a decreasing curve. Someone mentioned using the elbow (knee)
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
2001 Sep 21
1
Request for Help: Rotation of PCA Solution or Eigenvectors
Dear R Helper, I am writing because I seek to perform a varimax rotation on my Principal Components Analysis (PCA) solution. (I have been performing PCA's using the eigen command in R.) If you can tell me how to perform this rotation when I use the eigen command (or the princomp command) I would be thrilled. Thanks so much! Wendy Treynor Ann Arbor, MI USA
2005 Nov 22
1
SPSS-like factor analysis procedure
I've read through many postings about principle component analysis in the R-help archives, but haven't been able to piece together the information I need. I'd like to recreate an SPSS-like experience of factor analysis using R. Here's what SPSS produces: 1. Scatterplots of all possible variable pairs, with regression lines. xyplot(my.dataframe) is perfect but for the lack of
2008 May 16
1
Dimensions of svd V matrix
Hi, I'm trying to do PCA on a n by p wide matrix (n < p), and I'd like to get more principal components than there are rows. However, svd() only returns a V matrix of with n columns (instead of p) unless the argument nv=p is set (prcomp calls svd without setting it). Moreover, the eigenvalues returned are always min(n, p) instead of p, even if nv is set: > x <-
2011 Aug 17
4
How to use PC1 of PCA and dim1 of MCA as a predictor in logistic regression model for data reduction
Hi all, I'm trying to do model reduction for logistic regression. I have 13 predictor (4 continuous variables and 9 binary variables). Using subject matter knowledge, I selected 4 important variables. Regarding the rest 9 variables, I tried to perform data reduction by principal component analysis (PCA). However, 8 of 9 variables were binary and only one continuous. I transformed the data by
2008 Sep 11
2
Save object summary to file
Hi, Am wanting to save the summary of a PCA to file. Have tried: > write.table(summary(PCA), file="PCAvar.txt", sep="\t") but receive: Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class "summary.princomp" into a data.frame What am I doing wrong? Thanks -- View this message in context:
2010 May 02
2
Scree diagram,
hello, I've two questions today. 1) I'm trying to do a scree diagram, I did a Google for a specific command I could used to do so. All I could find is a screeplot. Are they the same command? 2) what command can I used to present a PC scores, eigenvectors of the PC scores, and component correlations? thanks! -- View this message in context:
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]]
2005 Jan 04
1
scree plot
Hi! Is there an easy way to add to the scree-plot labels to each value pertaining to the cumulative proportion of explained variance? Thanks and a happy new year Anne ---------------------------------------------------- Anne Piotet Tel: +41 79 359 83 32 (mobile) Email: anne.piotet@m-td.com --------------------------------------------------- M-TD Modelling and Technology Development PSE-C
2013 Mar 21
1
values for the scree plot (package psych)
Hello, I am using function princomp from the package psych. I have my principle component object mypc: mypc <- princomp(covmat=mycor) plot(mypc) # shows me a screeplot Question: how could I actually see the values displayed in the screeplot. I don't mean on the graph - I just want to know the actual value for each component (e.g., 10, 3.2, 1.8, etc.) I need to know how much variance,
2008 Sep 07
1
Label 2 groups in PCA different colours
Hi, I'm wanting to do a PCA on some data which is comprised of two different groups (to see how well the groups are discriminated). Is there a way to change the colour of the datapoints in a biplot so that I can easily see which group is which (eg objects 1-100, red, 101-200, black). Might be simple, but I'm new to R and can't seem to find how to do this. Thanks. Paul -- View this
2009 Apr 20
2
PCA and automatic determination of the number of components
Hi all, I have relatively small dataset on which I would like to perform a PCA. I am interested about a package that would also combine a method for determining the number of components (I know there are plenty of approaches to this problem). Any suggestions about a package/function? thanks, Nick -- View this message in context:
2006 Mar 13
0
Bootstrapping PCA + Standard Error Scree
Two questions about principal components analysis in R: Q.1) Hogenraad and McKenzie (1999) used Bruce Thompson's FACSTRAP program to bootstrap the factor loadings and scores in a principal components analysis. The input to the analysis was a word-word correlation matrix derived from a frequency count of x words across n texts. This is how they described their procedure: "Finally, we
2012 May 07
3
How to plot PCA output?
I have a decent sized matrix (36 x 11,000) that I have preformed a PCA on with prcomp(), but due to the large number of variables I can't plot the result with biplot(). How else can I plot the PCA output? I tried posting this before, but got no responses so I'm trying again. Surely this is a common problem, but I can't find a solution with google? The University of Dundee is a
2003 Jan 03
4
factor analysis (pca): how to get the 'communalities'?
Dear expe-R-ts, I try some test data for a factorAnalysis (resp. pca) in the sense of Prof. Ripley's MASS ? 11.1, p. 330 ff., just to prepare myself for an analysis of my own empirical data using R (instead of SPSS). 1. the data. ## The test data is (from the book of Backhaus et al.: Multivariate ## Analysemethoden. Springer 2000 [9th ed.], p. 300 ff):
2008 Apr 03
1
Lapack error in Design:::ols
Hi, I'm trying to use Frank Harrell's Design:::ols function to do regression of y (numeric) on the interaction of two factors (x1 and x2), but Lapack throws an error: > library(Design) ... > load(url("http://www.csse.unimelb.edu.au/~gabraham/x")) > ols(y ~ x1 * x2, data=x) Error in chol2inv(fit$qr$qr) : 'size' cannot exceed nrow(x) = 20 > traceback()
2008 Jul 03
2
PCA on image data
Dear R users, i would like to apply a PCA on image data for data reduction. The image data is available as three matrices for the RGB values. At the moment i use x <- data.frame(R,G,B)#convert image data to data frame pca<-princomp(x,retx = TRUE) This is working so far. >From this results then i want to create a new matrix from the first (second..) principal component. Here i stuck.
2009 Nov 27
2
Symmetric Matrix classes
Hi, I'd like to store large covariance matrices using Matrix classes. dsyMatrix seems like the right one, but I want to specify just the upper/lower triangle and diagonal and not have to instantiate a huge n^2 vector just for the sake of having half of it ignored: Dumb example: M <- new("dsyMatrix", uplo="U", x=rnorm(1e4), Dim=as.integer(c(100, 100))) diag(M) <- 1
2008 May 18
1
predict.prcomp: 'newdata' does not have the correct number of columns
Hi, I'm doing PCA on wide matrices and I don't understand why calling predict.prcomp on it throws an error: > x1 <- matrix(rnorm(100), 5, 20) > x2 <- matrix(rnorm(100), 5, 20) > p <- prcomp(x1) > predict(p, x2) Error in predict.prcomp(p, x2) : 'newdata' does not have the correct number of columns > dim(x2) [1] 5 20 > dim(p$rotation) [1] 20 5