Displaying 20 results from an estimated 4000 matches similar to: "PCA loadings differ vastly!"
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
2011 Jan 26
1
Factor rotation (e.g., oblimin, varimax) and PCA
A bit of a newbee to R and factor rotation I am trying to understand
factor rotations and their implementation in R, particularly the
GPArotation library.
I have tried to reproduce some of the examples that I have found, e.g., I
have taken the values from Jacksons example in "Oblimin Rotation",
Encyclopedia of Biostatistics
2010 Nov 30
3
pca analysis: extract rotated scores?
Dear all
I'm unable to find an example of extracting the rotated scores of a
principal components analysis. I can do this easily for the un-rotated
version.
data(mtcars)
.PC <- princomp(~am+carb+cyl+disp+drat+gear+hp+mpg, cor=TRUE, data=mtcars)
unclass(loadings(.PC)) # component loadings
summary(.PC) # proportions of variance
mtcars$PC1 <- .PC$scores[,1] # extract un-rotated scores of
2012 Oct 19
1
factor score from PCA
Hi everyone,
I am trying to get the factor score for each individual case from a principal component analysis, as I understand, both princomp() and prcomp() can not produce this factor score, the principal() in psych package has this option: scores=T, but after running the code, I could not figure out how to show the factor score results. Here is my code, could anyone give me some advice please?
2010 Jan 18
2
Rotating pca scores
Dear Folks
I need to rotate PCA loadings and scores using R.
I have run a pca using princomp and I have rotated PCA results with
varimax. Using varimax R gives me back just rotated PC loadings without
rotated PC scores.
Does anybody know how I can obtain/calculate rotated PC scores with R?
Your kindly help is appreciated in advance
Francesca
[[alternative HTML version deleted]]
2010 Jun 30
3
Factor Loadings in Vegan's PCA
Hi all,
I am using the vegan package to run a prcincipal components analysis
on forest structural variables (tree density, basal area, average
height, regeneration density) in R.
However, I could not find out how to extract factor loadings
(correlations of each variable with each pca axis), as is straightforwar
in princomp.
Do anyone know how to do that?
Moreover, do anyone knows
2009 Mar 25
2
pca vs. pfa: dimension reduction
Can't make sense of calculated results and hope I'll find help here.
I've collected answers from about 600 persons concerning three
variables. I hypothesise those three variables to be components (or
indicators) of one latent factor. In order to reduce data (vars), I
had the following idea: Calculate the factor underlying these three
vars. Use the loadings and the original var
2008 Sep 09
4
PCA and % variance explained
After doing a PCA using princomp, how do you view how much each component
contributes to variance in the dataset. I'm still quite new to the theory of
PCA - I have a little idea about eigenvectors and eigenvalues (these
determine the variance explained?). Are the eigenvalues related to loadings
in R?
Thanks,
Paul
--
View this message in context:
2004 Sep 14
3
Signs of loadings from princomp on Windows
I start a clean session of R 1.9.1 on Windows and I run the following code:
> library(MASS)
> data(painters)
> pca.painters <- princomp(painters[ ,1:4])
> loadings(pca.painters)
Loadings:
Comp.1 Comp.2 Comp.3 Comp.4
Composition 0.484 -0.376 0.784 -0.101
Drawing 0.424 0.187 -0.280 -0.841
Colour -0.381 -0.845 -0.211 -0.310
Expression 0.664 -0.330 -0.513
2012 Aug 15
0
color-coding of biplot points for varimax rotated factors (from PCA)
I'm using R for PCA and? factor analysis. I want to create biplots of
varimax rotated factors that color-code points by their
classification. My research is on streams that are urban and rural.
So, I want to color code them by this classification. If you just do a
biplot from prcomp or princomp, you cannot add this color. So, I have
used some code developed by a graduate student in our
2010 Apr 16
1
PCA scores
Hi all,
I have a difficulty to calculate the PCA scores. The PCA scores I calculated
doesn't match with the scores generated by R,
mypca<-princomp(mymatrix, cor=T)
myscore<-as.matrix(mymatrix)%*%as.matrix(mypca$loadings)
Does anybody know how the mypca$scores were calculated? Is my formula not
correct?
Thanks a lot!
Phoebe
[[alternative HTML version deleted]]
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
2011 Mar 03
2
PCA - scores
I am running a PCA, but would like to rotate my data and limit the
number of factors that are analyzed. I can do this using the
"principal" command from the psych package [principal(my.data,
nfactors=3,rotate="varimax")], but the issue is that this does not
report scores for the Principal Components the way "princomp" does.
My question is:
Can you get an
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 ############################
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")
>
2011 Apr 21
1
Rearranging PCA results from R
Hi!!
I'm having trouble selecting 10 out of 41 attributes of the KDD data set. In
order to identify the components with the higher variance I'm using
princomp. the result i get for summary(pca1) is:
Comp.1 Comp.2 Comp.3
Comp.4 Comp.5 Comp.6 Comp.7 Comp.8
Comp.9
2005 Oct 13
2
varimax rotation difference between R and SPSS
Hi,
I am puzzeled with a differing result of princomp in R and FACTOR in
SPSS. Regarding the amount of explained Variance, the two results are
the same. However, the loadings differ substantially, in the unrotated
as well as in the rotated form.
In both cases correlation matrices are analyzed. The sums of the squared
components is one in both programs.
Maybe there is an obvious reason, but I
2009 Apr 28
1
colored PCA biplot
Hi-
I'm trying to make my PCA (princomp) colored. In my csv excel sheet, I have
the first column numbered according to the groupings I want to assign to the
PCA. I've played around with trying to set this first column as the color
vector, but haven't had any luck.
Any suggestions? Thanks,
Hillary
[[alternative HTML version deleted]]
2011 Nov 05
1
testing significance of axis loadings from multivariate dudi.mix
Hi all
I?m trying to tests the significance of loadings from a ordination of 46 variables
(caategorical, ordinal and nominal). I used dudi.mix from ade4 for the ordination. A
years ago Jari Oksanen wrote this script implementing Peres-Neto et al. 2003 (Ecology)
bootstraping method:
netoboot <- function (x, permutations=1000, ...)
{
pcnull <- princomp(x, cor = TRUE, ...)
res
2007 Feb 13
1
Questions about results from PCAproj for robust principal component analysis
Hi.
I have been looking at the PCAproj function in package pcaPP (R 2.4.1) for
robust principal components, and I'm trying to interpret the results. I
started with a data matrix of dimensions RxC (R is the number of rows /
observations, C the number of columns / variables). PCAproj returns a list
of class princomp, similar to the output of the function princomp. In a
case where I can