Hello, I am trying to run a PCA in R and I cannot get the PC scores for each of the values. Using pcX <- princomp(X) then loadings(pcX) I can get a listing of the eigenvectors but not the actual PC scores for each value in the dataset. I greatly appreciate any help anyone can offer Thanks Ken
try: > pcX$scores and > pcX$loadings cheers, David Orlovich. On Thursday, January 30, 2003, at 04:48 PM, kenneth fortino wrote:> > Hello, I am trying to run a PCA in R and I cannot get the PC scores > for each of the values. Using pcX <- princomp(X) then loadings(pcX) I > can get a listing of the eigenvectors but not the actual PC scores for > each value in the dataset. I greatly appreciate any help anyone can > offer > > Thanks > Ken > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help >Dr David Orlovich Department of Botany, The University of Otago, P.O. Box 56, Dunedin, New Zealand. Phone +64 3 479 9060 Fax +64 3 479 7583 david.orlovich at botany.otago.ac.nz david.orlovich at unix.net http://www.botany.otago.ac.nz/
Try: res <- princomp(X, scores = TRUE) res$scores Cheers, Simon. Simon Blomberg Depression & Anxiety Consumer Research Unit Centre for Mental Health Research, Australian National University Simon.Blomberg at anu.edu.au +61 (2) 6125 3379 -----Original Message----- From: kenneth fortino [mailto:k_fortino at hotmail.com] Sent: Thursday, 30 January 2003 2:49 PM To: r-help at stat.math.ethz.ch Subject: [R] Principal comp. scores in R Hello, I am trying to run a PCA in R and I cannot get the PC scores for each of the values. Using pcX <- princomp(X) then loadings(pcX) I can get a listing of the eigenvectors but not the actual PC scores for each value in the dataset. I greatly appreciate any help anyone can offer Thanks Ken ______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
The package ade4 is devoted to multivariate analysis. You can have a look at the function dudi.pca of the ade4 package for principal component analysis.>Hello, I am trying to run a PCA in R and I cannot get the PC scores >for each of the values. Using pcX <- princomp(X) then loadings(pcX) >I can get a listing of the eigenvectors but not the actual PC scores >for each value in the dataset. I greatly appreciate any help anyone >can offer > >Thanks >Ken > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >http://www.stat.math.ethz.ch/mailman/listinfo/r-help-- St?phane DRAY --------------------------------------------------------------- Biom?trie et Biologie ?volutive - Equipe "?cologie Statistique" Universite Lyon 1 - Bat 711 - 69622 Villeurbanne CEDEX - France Tel : 04 72 43 27 56 Fax : 04 78 89 27 19 04 72 43 27 57 E-mail : dray at biomserv.univ-lyon1.fr --------------------------------------------------------------- ADE-4 http://pbil.univ-lyon1.fr/ADE-4/ADE-4F.html ---------------------------------------------------------------
Maybe Matching Threads
- In factor analysis in the psych package, how can I work out which factors the columns in $scores relate to? How do I know what each of the scores is scoring?
- NVC for Domino Virus Warning!
- how to get coefficient and scores of Principal component analysis in R?
- FreeBSD 4.5, Samba 2.2.4_1, W2K client "printer prope rties cannot be displayed"
- How to change the label position in axis() ?