Displaying 20 results from an estimated 6000 matches similar to: "factor analysis (pca): how to get the 'communal"
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):
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
2012 Jan 24
0
PCA for assets based household income analysis (" hetcor" and "princomp")
I am doing Principal Component Analysis (PCA) on assets data for household income prediction. The problem is that the assets data are rank ordered (usually binary ... possess car/don't possess car), so the normal correlation is inappropriate for the calculation of the PCA. Instead one has to use the polychoric correlation coefficient. It uses the "random.polychor.pa" package.
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
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
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
2008 Sep 24
2
rgl: ellipse3d with axes
Last week I asked about data ellipses with rgl:::ellipse3d() with lines
showing the principal axes.
(The goal is a visual demonstration of PCA as a rotation of variable
space to component space.)
I was trying, unsuccessfully, to use princomp() to generate the PCA axes
and plot them using
segments3d:
> > PC <- princomp(trees)
> > sdev <- PC$sdev # component standard
2005 Jun 26
0
Factor correlations in factanal
Dear R-devel list members,
Ben Fairbank draw it to my attention that factanal() (in the stats package)
doesn't report factor correlations for oblique rotations. Looking at the
source, I see that factanal also doesn't save the factor-transformation
(rotation) matrix from which these correlations can be computed. I've
modified the source, attached below, so that the transformation
2005 Jul 08
2
extract prop. of. var in pca
Dear R-helpers,
Using the package Lattice, I performed a PCA.
For example
pca.summary <- summary(pc.cr <- princomp(USArrests, cor = TRUE))
The Output of "pca.summary" looks as follows:
Importance of components:
Comp.1 Comp.2 Comp.3 Comp.4
Standard deviation 1.5748783 0.9948694 0.5971291 0.41644938
Proportion of Variance 0.6200604
2008 Sep 09
1
Addendum to wishlist bug report #10931 (factanal) (PR#12754)
--=-hiYzUeWcRJ/+kx41aPIZ
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Hi,
on March 10 I filed a wishlist bug report asking for the inclusion of
some changes to factanal() and the associated print method. The changes
were originally proposed by John Fox in 2005; they make print.factanal()
display factor correlations if factanal() is called with rotation =
2013 Nov 25
0
Hey guys
Hi,
Try:
dat1<- t(dat[,-1])
?colnames(dat1) <- dat[,1]
covmat <- cov(dat1)
A.K.
I'm running into this error and I'm not sure how fix it
Error: is.numeric(x) || is.logical(x) is not TRUE
This is my data frame
geneExpression_Lab10.txt
This is the homework instructions in case you want to see
Lab10.pdf
This is my code
dat <-read.delim("~/Dropbox/Homework/R
2003 Aug 08
1
covmat argument in princomp() (PR#3682)
R version: 1.7.1
OS: Red Hat Linux 7.2
When "covmat" is supplied in princomp(), the output value "center" is all
NA's, even though the input matrix was indeed centered. I haven't read
anything about this in the help file for princomp(). See code below for an
example: pc2$center is all NA's.
Jerome Asselin
x <- rnorm(6)
y <- rnorm(6)
X <- cbind(x,y)
2006 May 25
1
PC rotation question
On p. 48 of "Statistics Complements" to the 3rd MASS edition,
http://www.stats.ox.ac.uk/pub/MASS3/VR3stat.pdf
I read that the orthogonal rotations of Z Lambda^-1 remain
uncorrelated, where Z is the PC and Lambda is the diag matrix of
singular values.
However, the example below that text is
> A <- loadings(ir.pca) %*% diag(ir.pca$sdev)
If ir.pca$sdev are the singular values,
2009 May 09
2
Sweave \Sexpr{} advice please
Dear List,
First off, my deepest gratitude to the Sweave developers: this tool has
improved my quality greatly.
A question in my work I use \Sexpr{} statements scalar values and the xtable
package for all manner of tables. What I'd like to do is to use a vector
inline, rather than a whole separate table. Something like:
%%%%%%%%%%%%%%%% begin code
% Latex junk
% Sweave block:
2008 Mar 25
1
Error propagation
Dear R-helpers,
I´m in the context of writing a general function for error propagation
in R.
There are somehow a few questions I would like to ask (discuss), as my
statistical knowledge is somewhat restricted.
Below is the function I wrote, the questions are marked.
Many thanks in advance.
propagate <- function(expr, varList, type = c("stat", "raw"), cov =
TRUE)
{
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:
2010 Feb 04
0
pca in R: Problem Fixed
Good day all.
This is to thank all those who have helped in fixing this problem. Starting
with a text book was indeed a problem, however, that gave me a clue of what
I was looking for. This, with your contributions added to other materials I
got on the net, put me on the right track. Thank you so much.
Warmest regards
Ogbos
On 31 January 2010 14:07, S Ellison <S.Ellison@lgc.co.uk> wrote:
2002 Aug 29
2
Factor Analysis in MASS4
Hi,
I had a look at the MASS4 scripts in the MASS package, in Ch 11.3 Factor
Analysis, there is a section of codes like:
data(ability.cov)
ability.FA <- factanal(covmat = ability.cov, factors = 1)
ability.FA
(ability.FA <- update(ability.FA, factors = 2))
#summary(ability.FA)
round(loadings(ability.FA) %*% t(loadings(ability.FA)) +
diag(ability.FA$uniq), 3)
2010 Jan 30
1
pca in R
Hi,
I am learning how to do principal component analysis in R. However, since I
am family with only a few built-in functions like prcomp, sd, cor, I started
manually with examples in text books while trying to use the few functions I
know to manipulate what they have in the text. From the example in the text
I obtained a data set. Using cor and cov, I calculated the correlation and
covariance of
2000 Jun 15
1
prcomp help: is this a typo?
Dear All,
The help for prcomp, under "Value" says:
sdev: the standard deviation of the principal components (i.e., the
eigenvalues of the cov matrix, though the calculation is
actually done with the singular values of the data matrix).
The way I read it, it implies that the sdev are the eigenvalues, but I think
that sdev is actually the square root of the