Displaying 20 results from an estimated 5000 matches similar to: "Princomp$Scores"
2003 Apr 11
2
princomp with not non-negative definite correlation matrix
$ R --version
R 1.6.1 (2002-11-01).
So I would like to perform principal components analysis on a 16X16
correlation matrix, [princomp(cov.mat=x) where x is correlation matrix],
the problem is princomp complains that it is not non-negative definite.
I called eigen() on the correlation matrix and found that one of the
eigenvectors is close to zero & negative (-0.001832311). Is there any
way
2003 Jan 30
3
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
2011 Jan 28
3
how to get coefficient and scores of Principal component analysis in R?
Dear All,
It might be a simple question. But I could not find the answer from function “prcomp” or “princomp”. Does anyone know what are the codes to get coefficient and scores of Principal component analysis in R?
Your reply will be appreciated!
Best
Zunqiu
[[alternative HTML version deleted]]
2010 Jan 21
1
why scores are different in rda() and princomp()
hello,
I am doing PCA in R using some habitat factors, and I used the function result1=rda() and result2=princomp(),then pick up scores of the result1 and result2 using scores(),but the scores are significantly different,i do not know the meaning of it.
Best wishes!
Cheng
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
2003 Aug 19
1
princomp scores reproduced
Hi,
I used "princomp" for PCA analysis based on
correlation matrix (cor=T). I would like to reproduce
the scores for each observation by first standardizing
the data matrix (mean=0, std err=1), and then
multiplied by the loadings of each variable for each
principle components. I get very close numbers, but
not exactly the same. anything I missed here?
tahnks
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
2005 May 25
3
Rounding fractional numbers to nearest fraction
Hi all,
I've got a matrix of fractional data that is all positive and greater than
zero that I would like to "loosely" classify, for lack of a better word. It
looks something like this :
1.07 1.11 1.27 1.59 0.97 0.76
2.23 0.98 0.71 0.88 1.19 1.02
What I'm looking for is a way to round these numbers to the nearest 0.25,
i.e. the above matrix would be
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
2006 Jul 31
1
How does biplot.princomp scale its axes?
I'm attempting to modify how biplot draws its red vectors (among other
things). This is how I've started:
Biplot <- function(xx, comps = c(1, 2), cex = c(.6, .4))
{
## Purpose: Makes a biplot with princomp() object to not show arrows
## ----------------------------------------------------------------------
## Arguments: xx is an object made using princomp()
##
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
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
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)
2005 Oct 03
3
Problem building/checking library that requires input from user
Hi all,
I've got a package i've written that i am trying to check, build, and
install. This is my 1st time doing this, so apologies in advance... ;)
The package that I've written requires input from the user. It needs to know
sample sizes and then runs some calcs, (sample sizes are just integers), and
it gets this info from the user as
num_reps <- readline("How many reps
2007 Apr 27
1
how to be clever with princomp?
Hi all,
I have been using princomp() recently, its very useful indeed, but I have
a question about how to specify the rows of data you want it to choose.
I have a set of variables relating to bird characteristics and I have been
using princomp to produce PC scores from these.
However since I have multiple duplicate entries per individual (each bird
had a varying number of chicks), I only want
2003 Jul 15
2
"na.action" parameter in princomp() (PR#3481)
Full_Name: Jerome Asselin
Version: 1.7.1
OS: Red Hat Linux 7.2
Submission from: (NULL) (24.77.125.119)
Setting the parameter na.action=na.omit should remove
incomplete records in princomp. However this does not
seem to work as expected. See example below.
Sincerely,
Jerome Asselin
data(USArrests)
princomp(USArrests, cor = TRUE) #THIS WORKS
USArrests[1,3] <- NA
princomp(USArrests, cor =
2007 Apr 23
3
Help about princomp
Hello,
I have a problem with the princomp method, it seems stupid but I don't know
how to handle it.
I have a dataset with some regular data and some outliers. I want to
calculate a PCA on the regular data and get the scores for all data,
including the outliers. Is this possible on R?
Thank you for helping!!!
--
View this message in context:
2006 Jan 16
1
princomp() with missing values in panel data?
dear R wizards: the good news is that I know how to omit missing
observations and run a principal components analysis.
p= princomp( na.omit( dataset ) )
p$scores[ ,1] # the first factor
(where dataset contains missing values; incidentally, princomp(retailsmall,
na.action=na.omit) does not work for me, so I must be doing something wrong,
here.) the bad news is that I would like NA
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"
2009 Nov 26
1
R help with princomp and pam clustering
Hi all!
I am working with R package cluster and I have a little problem:
let's say I have two datasets...first one ("A") is divided into 4 clusters
by means of Pam algorythm.
Let's say I want to project the second database ("B") onto the Comp.1 X
Comp.2 graph, and see where its elements are placed.
The two datasets are made of different dim (54x19 and 28x19). I tried