Displaying 20 results from an estimated 400 matches similar to: "prcomp"
2004 Mar 17
0
mva :: prcomp
Dear R-list users,
I'm new to principal components and factor analysis.
I thought this method can be very useful for me to find relationships
between several variables (which I know there is, only don't know which
variables exactly and what kind of relation), so as a structure
detection method.
Now, I'm experimenting with the function prcomp from the mva package.
In my source code
2011 Sep 28
0
PCA: prcomp rotations
Hi all,
I think I may be confused by different people/programs using the word
rotation differently.
Does prcomp not perform rotations by default?
If I understand it correctly retx=TRUE returns ordinated data, that I can
plot for individual samples (prcomp()$x: which is the scaled and centered
(rotated?) data multiplied by loadings).
What does it mean that the data is rotated from the
2011 Sep 09
2
prcomp: results with reversed sign in output?
Dear All,
when I'm running a PCA with
prcomp(USArrests, scale = TRUE)
I get the right principal components, but with the wrong sign infront
Rotation:
PC1 PC2 PC3 PC4
Murder 0.5358995 -0.4181809 0.3412327 0.64922780
Assault 0.5831836 -0.1879856 0.2681484 -0.74340748
UrbanPop 0.2781909 0.8728062 0.3780158 0.13387773
Rape 0.5434321 0.1673186 -0.8177779 0.08902432
instead of
PC1 PC2 PC3 PC4
2004 Jun 22
0
prcomp & eigenvectors
I have the following situation I want to analyse with prcomp.
Each subject has a curve called the contrast sensitivity function (CSF).
This curve's overall shape is due to the additive output of 3 "channels"
(eigenvectors).
#this shows 3 SF channels; net CSF = c1 + c2+c3
x<-1:100
c1<-dnorm(x,mean=20,sd=20)
c2<-dnorm(x,mean=50,sd=20)
c3<-dnorm(x,mean=80,sd=20)
2007 Aug 02
1
Streamlining Prcomp Data
Hello all,
I was wondering if anyone knew how to get R to only spit out a certain portion
of PRcomp data; namely, when I enter the following code, I get:
> Summary(prcomp(USArrests))
Importance of components:
PC1 PC2 PC3 PC4
Standard Deviation 83.732 14.212 6.489 2.483
Proportion of Variance 0.966 0.0278 0.0058 0.00085
Cumulative Proportion 0.966
2016 Mar 24
0
summary( prcomp(*, tol = .) ) -- and 'rank.'
Martin, I fully agree. This becomes an issue when you have big matrices.
(Note that there are awesome methods for actually only computing a small
number of PCs (unlike your code which uses svn which gets all of them);
these are available in various CRAN packages).
Best,
Kasper
On Thu, Mar 24, 2016 at 1:09 PM, Martin Maechler <maechler at stat.math.ethz.ch
> wrote:
> Following from
2012 Apr 09
1
sdev, variance in prcomp
Hello,
It might be a trivial question but I just wanted to find out the relationship between sdev and proportion of variance generated by prcomp. I got the following result from my data set
???????????????????????????? PC1????? PC2????? PC3
Standard deviation???? 104.89454 15.40910 9.012047
Proportion of Variance?? 0.52344? 0.01130 0.003860
Cumulative Proportion??? 0.52344? 0.53474 0.538600
2010 Jun 16
2
Accessing the elements of summary(prcomp(USArrests))
Hello again,
I was hoping one of you could help me with this problem. Consider the sample data from R:
> summary(prcomp(USArrests))
Importance of components:
PC1 PC2 PC3 PC4
Standard deviation 83.732 14.2124 6.4894 2.48279
Proportion of Variance 0.966 0.0278 0.0058 0.00085
Cumulative Proportion 0.966 0.9933 0.9991 1.00000
How do I access the
2009 Mar 10
1
Using napredict in prcomp
Hello all,
I wish to compute site scores using PCA (prcomp) on a matrix with
missing values, for example:
Drain Slope OrgL
a 4 1 NA
b 2.5 39 6
c 6 8 45
d 3 9 12
e 3 16 4
...
Where a,b... are sites.
The command
> pca<-prcomp(~ Drain + Slope + OrgL, data = t, center = TRUE, scale =
TRUE, na.action=na.exclude)
works great, and from
2012 Jun 20
1
prcomp: where do sdev values come from?
In the manual page for prcomp(), it says that sdev is "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)." ?However, this is not what I'm finding. ?The values appear
to be the standard deviations of a reprojection of
2016 Mar 25
0
summary( prcomp(*, tol = .) ) -- and 'rank.'
As I see it, the display showing the first p << n PCs adding up to 100% of the variance is plainly wrong.
I suspect it comes about via a mental short-circuit: If we try to control p using a tolerance, then that amounts to saying that the remaining PCs are effectively zero-variance, but that is (usually) not the intention at all.
The common case is that the remainder terms have a roughly
2012 Aug 22
1
Error in if (n > 0)
I've searched the Web with Google and do not find what might cause this
particular error from an invocation of cenboxplot:
cenboxplot(cu.t$quant, cu.t$ceneq1, cu.t$era, range=1.5, main='Total
Recoverable Copper', ylab='Concentration (mg/L)', xlab='Time Period')
Error in if (n > 0) (1L:n - a)/(n + 1 - 2 * a) else numeric() :
argument is of length zero
I do
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
2016 Mar 25
0
summary( prcomp(*, tol = .) ) -- and 'rank.'
> On 25 Mar 2016, at 10:08 , Jari Oksanen <jari.oksanen at oulu.fi> wrote:
>
>>
>> On 25 Mar 2016, at 10:41 am, peter dalgaard <pdalgd at gmail.com> wrote:
>>
>> As I see it, the display showing the first p << n PCs adding up to 100% of the variance is plainly wrong.
>>
>> I suspect it comes about via a mental short-circuit: If we
2009 Nov 09
4
prcomp - principal components in R
Hello, not understanding the output of prcomp, I reduce the number of
components and the output continues to show cumulative 100% of the
variance explained, which can't be the case dropping from 8 components
to 3.
How do i get the output in terms of the cumulative % of the total
variance, so when i go from total solution of 8 (8 variables in the data
set), to a reduced number of
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
2016 Mar 24
3
summary( prcomp(*, tol = .) ) -- and 'rank.'
Following from the R-help thread of March 22 on "Memory usage in prcomp",
I've started looking into adding an optional 'rank.' argument
to prcomp allowing to more efficiently get only a few PCs
instead of the full p PCs, say when p = 1000 and you know you
only want 5 PCs.
(https://stat.ethz.ch/pipermail/r-help/2016-March/437228.html
As it was mentioned, we already
2016 Mar 25
2
summary( prcomp(*, tol = .) ) -- and 'rank.'
> On 25 Mar 2016, at 10:41 am, peter dalgaard <pdalgd at gmail.com> wrote:
>
> As I see it, the display showing the first p << n PCs adding up to 100% of the variance is plainly wrong.
>
> I suspect it comes about via a mental short-circuit: If we try to control p using a tolerance, then that amounts to saying that the remaining PCs are effectively zero-variance, but
2016 Mar 24
3
summary( prcomp(*, tol = .) ) -- and 'rank.'
I agree with Kasper, this is a 'big' issue. Does your method of taking only
n PCs reduce the load on memory?
The new addition to the summary looks like a good idea, but Proportion of
Variance as you describe it may be confusing to new users. Am I correct in
saying Proportion of variance describes the amount of variance with respect
to the number of components the user chooses to show? So
2008 Feb 10
1
prcomp vs. princomp vs fast.prcomp
Hi R People:
When performing PCA, should I use prcomp, princomp or fast.prcomp, please?
thanks.
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com