Displaying 20 results from an estimated 4000 matches similar to: "princomp"
1999 Oct 07
1
[Fwd: Libraries loading, but not really?] - it really IS a problem :-(
kalish at psy.uwa.edu.au wrote:
>
> I'm a newbie at R, and can't get libraries to really work.
> I did this:
> > library(help = mva)
> cancor Canonical Correlations
> cmdscale Classical (Metric) Multidimensional Scaling
> dist Distance Matrix Computation
> hclust Hierarchical Clustering
2005 Sep 16
1
About princomp
Hi,
I run the example for princomp for R211
I got the following error for biplot
> ## The variances of the variables in the
> ## USArrests data vary by orders of magnitude, so scaling is appropriate
> (pc.cr <http://pc.cr> <- princomp(USArrests)) # inappropriate
Erreur dans cov.wt(z) : 'x' must contain finite values only
> princomp(USArrests, cor = TRUE) # =^=
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
2009 Nov 25
1
which to trust...princomp() or prcomp() or neither?
According to R help:
princomp() uses eigenvalues of covariance data.
prcomp() uses the SVD method.
yet when I run the (eg., USArrests) data example and compare with my own
"hand-written" versions of PCA I get what looks like the opposite.
Example:
comparing the variances I see:
Using prcomp(USArrests)
-------------------------------------
Standard deviations:
[1] 83.732400 14.212402
2008 Nov 03
1
Input correlation matrix directly to princomp, prcomp
Hello fellow Rers,
I have a no-doubt simple question which is turning into a headache so
would be grateful for any help.
I want to do a principal components analysis directly on a correlation
matrix object rather than inputting the raw data (and specifying cor =
TRUE or the like). The reason behind this is I need to use polychoric
correlation coefficients calculated with John Fox's
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 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 =
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()
##
2008 Jan 13
1
What is the 'scale' in princomp() function?
Dear R users,
When I tried to use princomp() from stats packages to do Principal
Components Analysis, I am not very clear what is the "scale".
And the scores are different from "PROC PRINCOMP" procedure from SAS.
Using the example data from this package:
restpc <- princomp(USArrests, cor = TRUE)
> restpc$scale
Murder Assault UrbanPop Rape
4.311735 82.500075
2000 Oct 03
3
prcomp compared to SPAD
Hi !
I've used the example given in the documentation for the prcomp function
both in R and SPAD to compare the results obtained.
Surprisingly, I do not obtain the same results for the coordinates of
the principal composantes with these two softwares.
using USArrests data I obtain with R :
> summary(prcomp(USArrests))
Importance of components:
PC1 PC2
2010 May 06
1
how to get components / factors in factanal / princomp not loadings
Dear all,
i wonder if there?s a command to obtain the actual values of a principal component or a factor (not as.factor, but factanal) .
test=princomp(USArrests, cor = TRUE)
summary(test)
just outputs, standard deviation, Prop of Variance and cumulative proportion of variance.
test$loadings offers yet another proportion of variance scheme. why is that?
Apart from that:
Is there a
2009 Dec 24
1
bug in princomp example (PR#14167)
When I run
example(princomp)
I get the following error message:
prncmp> ## The variances of the variables in the
prncmp> ## USArrests data vary by orders of magnitude, so scaling is
appropriate
prncmp> (pc.cr <- princomp(USArrests)) # inappropriate
Error in cov.wt(z) : 'x' must contain finite values only
Seth Roberts
--
blog.sethroberts.net
www.shangriladiet.com
2004 Sep 30
3
biplot.princomp with loadings only
Hi
is there a way to plot only the loadings in a biplot (with the nice
arrows), and to skip the scores?
thanks
christoph
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]]
2012 Apr 20
1
Quick question about princomp/biplot
Hi everyone.
I performing a simple PCA using the princomp function. Then, I use the
biplot function to show it. However, the function use line number to
represent samples. I would like to know if there's a way to use a dot
(point) instead of the line number when using the biplot function.
With regards,
Phil
--
View this message in context:
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
2010 Jun 15
1
Getting the eigenvectors for the dependent variables from principal components analysis
Dear listserv,
I am trying to perform a principal components analysis and create an output table of the eigenvalues for the dependent variables. What I want is to see which variables are driving each principal components axis, so I can make statements like, "PC1 mostly refers to seed size" or something like that.
For instance, if I try the example from ?prcomp
> prcomp(USArrests,
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
2007 May 25
2
R-About PLSR
hi R help group,
I have installed PLS package in R and use it for princomp & prcomp
commands for calculating PCA using its example file(USArrests example).
But How I can use PLS for Partial least square, R square, mvrCv one more
think how i can import external file in R. When I use plsr, R2, RMSEP it
show error could not find function plsr, RMSEP etc.
How I can calculate PLS, R2, RMSEP, PCR,
2003 Aug 12
1
Princomp function in R
Hi,
I want to use Princomp function in R, but com up an error as " Error:
couldn't find function "princomp" ", can you help me resolve this problem?
Thanks,
Jixin Dai, Ph.D