This is a statistical question, which is typically off topic here.
This list is primarily concerned with R programming questions,
although the two areas sometimes do intersect. I suggest you post on a
statistical list such as stats.stackexchange.com instead, especially
if you do not get a useful re
Off topic for this list.
Post on stats.stackexchange.com or similar for statistics questions.
Post on Bioconductor list for biology-related (e.g. proteomics) data
anaysis questions.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking th
Mohsen,
Check at Bioconductor.
Andrés
> El 03/03/2016, a las 9:43, Mohsen Jafarikia escribió:
>
> Hello everyone:
>
> I have about a couple of thousands of samples each with about 100 SNP
> genotypes and I would like to do PCA using genotypes. I looked on the
> web and found different option
Of Boris Steipe
Sent: Monday, November 30, 2015 9:01 AM
To: debra ragland
Cc: r-help
Subject: Re: [R] PCA plot of variable names only
Please keep communications on list.
This is too confused to continue productively.
See here: http://adv-r.had.co.nz/Reproducibility.html
http://stackover
77840-4352
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Boris Steipe
Sent: Monday, November 30, 2015 9:01 AM
To: debra ragland
Cc: r-help
Subject: Re: [R] PCA plot of variable names only
Please keep communications on list.
This is too confused to c
Please keep communications on list.
This is too confused to continue productively.
See here: http://adv-r.had.co.nz/Reproducibility.html
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
... and please read the posting guide and don't post in HTML.
On Nov 3
> Any idea on how to generate such a plot based on this description?
One simple way of suppressing the individual points in biplot() is to give the
labels a colour of 0.
Adapting the biplot.princomp example:
biplot(princomp(USArrests), col=c(0,1))
But that retains the point plot axes. If
Your description is obscure but the following may get you started. The function
prcomp() returns a list in which the matrix x contains the rotated values of
your input. Assuming that your "variable names" are the rownames of your input,
you can plot them with text().
Something like (untested)
Dear All,
Thank You for the quick responses.
Managed to solve my problem through:
http://www.faculty.biol.ttu.edu/strauss/multivar/R/SamplePCABootstrap.R.txt
or
http://r.789695.n4.nabble.com/bootstrapped-eigenvector-method-following-prcomp-td877655.html
Used the first one however, code is too long
psych does not currently have bootstrapped confidence intervals for loadings.
That is a reasonable request and I will try to add it, perhaps in the “real
soon now” version of 1.5.4 (almost finished), perhaps in the next release,
Bill
> On Apr 13, 2015, at 2:38 PM, stephen sefick wrote:
>
> H
Hi,
Please search the mailing list archives for this, or type bootstrapped PCA
R into google. Please provide a minimal self-contained example of what you
are trying to solve. Please read the posting guide that is referenced at
the end of every email.
kind regards,
Stephen
On Mon, Apr 13, 2015 at
On Sun, 18 Jan 2015, Jackson Rodrigues wrote:
I have a matrix with 72 plant species, however most of them are irrelevant
or not very important. When they are displayed together my plot is
cluttered.So I want to constrain my biplot showing only species A B C D.
How can I write the right code?
J
Hi,
You have to transform it to a Data Frame.
Try:
files <- stack(rasterlist)
filesdf<-as.data.frame(files)
pca <- princomp(formula = ~., data = filesdf, cor = TRUE,
na.action=na.exclude)
hope it helps
Gustavo
Em quinta-feira, 30 de outubro de 2014 14h38min56s UTC-2, John Wasige
escreveu
riginal Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Jim Silverton
Sent: 08 July 2014 17:30
To: r-help@r-project.org
Subject: Re: [R] PCA with a lot of zeros
Hello all,
I was wondering if R has some routine that can handle PCA with a lot of
Hello all,
I was wondering if R has some routine that can handle PCA with a lot of
zeros. I have fourteen variables - these variables represent angles...so
there are some negative and some positive angles. Histograms appear sparse
- in the sense that there are gaps. Any ideas or papers would be gre
That worked! Wow easy fix, i feel dumb! Thanks!
--
View this message in context:
http://r.789695.n4.nabble.com/PCA-factominer-package-question-about-changing-labels-in-individuals-factor-map-tp4683924p4683941.html
Sent from the R help mailing list archive at Nabble.com.
___
Try
rownames(dat) <- dat[,1]
before running PCA.
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of
Hi,
see tutorial for Adegenet, http://adegenet.r-forge.r-project.org/ |
Documents | adegenet-basics.pdf | section 6. It should help You.
Vojtěch
-
Vojtěch Zeisek
Department of Botany, Faculty of Science, Charles Uni., Prague, CZ
Institute of Botany, Academy of Science, Czech Republic
Commun
ingston ON Canada
> -Original Message-
> From: a...@walla.co.il
> Sent: Wed, 10 Jul 2013 12:49:55 -0700 (PDT)
> To: r-help@r-project.org
> Subject: Re: [R] PCA and gglot2
>
> Dear John,
>
> Thanks for the help.
>
> I did some minor modifications to your
Hi,
Thanks to ssefick for the ggbiplot tip.
It works fine so I submit a general script thats works for future users.
library(ggbiplot)
data<-read.csv("C:/…/MyPCA.csv")
data1<-data[,1:4]
my.pca <- prcomp(data1, scale. = TRUE)
my.class<- data$Group
g <- ggbiplot(my.pca, obs.scale = 1, var.scal
Dear John,
Thanks for the help.
I did some minor modifications to your script as I had some problems:
...
pca = PCA(data[,1:4], scale.unit=T, graph=F)
dat1 <- data.frame(pca$scores) # creates the data.frame
dat1$items <- rownames(data$group) # adds item names
ggplot(dat1, aes(pca$ind$coord[
Fig 4 but there the author is using geom_segment to add the lines but I
> have not looked at it all that carefully.
>
>
>
>
>
> John Kane
> Kingston ON Canada
>
>
> > -Original Message-
> > From: a...@walla.co.il
> > Sent: Wed, 10 Jul 2013 11:02
Fig 4 but there the author is using geom_segment to add the lines but I
> have not looked at it all that carefully.
>
>
>
>
>
> John Kane
> Kingston ON Canada
>
>
> > -Original Message-
> > From: a...@walla.co.il
> > Sent: Wed, 10 Jul 2013 11:02
N Canada
> -Original Message-
> From: a...@walla.co.il
> Sent: Wed, 10 Jul 2013 11:02:11 -0700 (PDT)
> To: r-help@r-project.org
> Subject: Re: [R] PCA and gglot2
>
> Hi,
>
> Thanks. Fig 4 in the link you provided is what I am looking for.
>
> I still do no
Hi,
Thanks. Fig 4 in the link you provided is what I am looking for.
I still do not know how to implement my data1 and pca1 in the script you
provided as I think it is only a part of a full script.
"
data1<-read.csv("C:/…/MyPCA.csv")
pca1 <- princomp(data1[,1:4], score=TRUE, cor=TRUE)
"
Am I ri
> > The biplot present the data points as numbers. How can I
> present the
> > data point in color (depends on their group-column 5). I
> was thinking
> > about doing it using ggplot2 but I can not succeed. Any
> idea how to do
> > it?
Perhaps the post at
http://www.codesofmylife.com/2012/06
It looks like you can if I understand properly. Try this
dat1 <- data.frame(dat1$scores)
dat1$items <- rownames(data1)
ggplot(dat1, aes(Comp.1, Comp.2, colour = items)) + geom_point() +
theme(legend.position="none")
John Kane
Kingston ON Canada
> -Original Message-
> From: a...@w
Spearman would be easier since you just convert the data to ranks and use
the Pearson correlation:
> set.seed(42)
> x <- data.frame(matrix(sample(1:9, 20, replace=TRUE), 10, 2))
> x
X1 X2
1 9 5
2 9 7
3 3 9
4 8 3
5 6 5
6 5 9
7 7 9
8 2 2
9 6 5
10 7 6
> cor(x)
Try adding the parameter xpd=TRUE to your legend() statement. Without
reproducible code it is pretty hard to be sure what the problem is.
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
>
in biplot you could set the limits xlim, ylim of the axes to zoom in on the
plot.
-
Yasir Kaheil
--
View this message in context:
http://r.789695.n4.nabble.com/PCA-tp4636840p4636961.html
Sent from the R help mailing list archive at Nabble.com.
__
The arrows are not pointing in the most-varying direction of the data. The
principal components are pointing in the most-varying direction of the
data. But you are not plotting the data on the original scale, you are
plotting the data on the rotated scale, and thus the horizontal axis is the
most
> "SL" == Steve Lianoglou
> on Mon, 23 Apr 2012 01:10:31 -0400 writes:
SL> On Mon, Apr 23, 2012 at 12:01 AM, Michael
SL> wrote:
>> yes, but that is not a good Review or Survey... thx
SL> But the packages listed there do have their own
SL> documentation and vignet
On Mon, Apr 23, 2012 at 12:01 AM, Michael wrote:
> yes, but that is not a good Review or Survey... thx
But the packages listed there do have their own documentation and
vignettes. For instance the rrcov package seems to have a nice
vignette about its design as well as methods it implements, and
r
yes, but that is not a good Review or Survey... thx
On Sun, Apr 22, 2012 at 9:47 PM, Bert Gunter wrote:
> As I believe I already told you, look at the CRAN Robust task view.
>
> -- Bert
>
> On Sun, Apr 22, 2012 at 6:29 PM, Michael wrote:
> > Even in R, there are so many of "robust PCA"... any s
As I believe I already told you, look at the CRAN Robust task view.
-- Bert
On Sun, Apr 22, 2012 at 6:29 PM, Michael wrote:
> Even in R, there are so many of "robust PCA"... any survey or review of all
> these different methods?
>
> On Sun, Apr 22, 2012 at 6:58 PM, Joshua Wiley wrote:
>
>> On Su
Even in R, there are so many of "robust PCA"... any survey or review of all
these different methods?
On Sun, Apr 22, 2012 at 6:58 PM, Joshua Wiley wrote:
> On Sun, Apr 22, 2012 at 4:43 PM, Michael wrote:
> > I actually tried "robustPca" in "pcaMethods" on bioconductor.
> >
> > It keeps giving me
On Sun, Apr 22, 2012 at 4:43 PM, Michael wrote:
> I actually tried "robustPca" in "pcaMethods" on bioconductor.
>
> It keeps giving me the warning "Input data is not complete"...
>
> Reading into the function:
>
> When there is no "NA"s, it will give this warning...
>
> It seems that there is a bu
Any thoughts on this error in robustSVD?
Thanks a lot!
Error in if (!all(tmp)) { : missing value where TRUE/FALSE needed
Enter a frame number, or 0 to exit
1: #73: pca(dTmp, method = "robustPca", nPcs = nNumFactors, center = FALSE)
2: robustPca(prepres$data, nPcs = nPcs, ...)
3: robustSvd(Mat
I actually tried "robustPca" in "pcaMethods" on bioconductor.
It keeps giving me the warning "Input data is not complete"...
Reading into the function:
When there is no "NA"s, it will give this warning...
It seems that there is a bug in this code...
Is it reliable at all?
You can also have a look at the pcaMethods package on Bioconductor.
Kevin
On Thu, Apr 19, 2012 at 11:20 PM, Michael wrote:
> Hi all,
>
> I found that the PCA gave chaotic results when there are big changes in a
> few data points.
>
> Are there "improved" versions of PCA in R that can help with
Michael:
On Thu, Apr 19, 2012 at 9:20 PM, Michael wrote:
> Hi all,
>
> I found that the PCA gave chaotic results when there are big changes in a
> few data points.
Yup.
>
> Are there "improved" versions of PCA in R that can help with this problem?
Yup.
Consult the "Robust" task view on CRAN. Yo
Hi,
I have 6 variables and I want to do a PCA Kernel on the 6 variables. But I
want the scores from the from the PCA kernel method. for each subject. Does
anyone know how to do this?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
__
R-h
Without taking away all the fun of trial and error, and exploration in R... I
will direct you to this website which I found invaluable when I first began
to use R.
one way would be to use:
plot(Yourdata, type="n")
and then 3 text() or points() statements to plot the groups represented by
differen
You'll get more useful answers if you tell us what you did, and provide a
reproducible example.
For instance, a bit of your data using dput(), your sessionInfo(), str() for
your data, and the actual commands you're using to run PCA, as well
as the error messages you're getting.
The clearer you ar
... and adding to what has already been said, PCA can be distorted by
non-ellipsoidal distributions or small numbers of unusual values.
Careful (chiefly graphical) examination of results is therefore
essential, and usually fairly easy to do. There are robust/resistant
versions of PCA in R, but they
On Dec 10, 2011 at 5:56pm deb wrote:
> My question is, is there any way I can map the PC1, PC2, PC3 to the
> original conditions,
> so that i can still have a reference to original condition labels after
> PCA?
deb,
To add to what Stephen has said. Best to do read up on principal component
anal
By doing PCA you are trying to find a lower dimensional representation
of the major variation structure in your data. You get PC* to represent
the "new" data. If you want to know what loads on the axes then you
need to look at the loadings. These are the link between the original
data and th
Did you perhaps send an HTML message? As detailed in the Posting
Guide, those get scrubbed by the mail-server.
On Oct 21, 2011, at 10:48 AM, seanstcl...@verizon.net wrote:
--
David Winsemius, MD
West Hartford, CT
__
R-help@r-project.org mailing li
> -Original Message-
> christopher stratton
> Sent: 14 August 2011 22:22
> Subject: [R] PCA Using prcomp()
>
> From the results
> generated by prcomp(), is there a way to print a matrix
> showing the contributions of the original variables to each
> PC?
Sounds like you're looking for
Hi Armin,
Please copy the list on your emails. Providing your matrix A (or some
other reproducible example) would be useful to anyone who wanted to
help you. It is easy to do by copying the output from your console
from running:
dput(A)
This would at least let us try out your code on your data
At 03:56 20/07/2011, Joshua Wiley wrote:
On Mon, Jul 18, 2011 at 10:48 AM, a.me...@yahoo.co.uk
wrote:
> Ok thank you Josh.
>
> Basically I have a matrix A with 7 rows and 18 columns.
If i < j (where i is the number of rows in your matrix and j is the
number of columns), then the determinant of
On Mon, Jul 18, 2011 at 10:48 AM, a.me...@yahoo.co.uk
wrote:
> Ok thank you Josh.
>
> Basically I have a matrix A with 7 rows and 18 columns.
If i < j (where i is the number of rows in your matrix and j is the
number of columns), then the determinant of the covariance (or
correlation) matrix |Sig
Hi,
You need to explain what you want to do. This is not a software
issue, you simply cannot create more uncorrelated variables than you
have observations.
Josh
On Mon, Jul 18, 2011 at 8:53 AM, a.me...@yahoo.co.uk
wrote:
> Hi,
>
> May I ask a question about a thread
> https://stat.ethz.ch/pipe
On 04.03.2011 17:52, Shari Clare wrote:
Hi Bill and Josh:
When I run any "principal" code with scores=TRUE, I get the following
Error:
Error in principal (my.data,3,scores=TRUE) : unused argument
(scores=TRUE)
Thoughts?
Your psych version (and probably also your R version) is outdated?
Ple
Hi Bill and Josh:
When I run any "principal" code with scores=TRUE, I get the following
Error:
Error in principal (my.data,3,scores=TRUE) : unused argument
(scores=TRUE)
Thoughts?
Thanks,
Shari
On 3-Mar-11, at 9:42 PM, William Revelle wrote:
> Shari,
> Josh partly answered your ques
At 9:52 AM -0700 3/4/11, Shari Clare wrote:
Hi Bill and Josh:
When I run any "principal" code with scores=TRUE, I get the following Error:
Error in principal (my.data,3,scores=TRUE) : unused argument (scores=TRUE)
Thoughts?
What version of psych are you using?
Does it work on the example I
Shari,
Josh partly answered your question, but his example did not include
rotation because he took out just one factor.
Try:
require(psych)
mt.pc <- principal(mtcars,3,scores=TRUE) #this gives you the
varimax rotated first 3 principal components
#pc.scores <- mt.pc$scores #here are
Hi Shari,
Yes, please look at the documentation for principal. You can access
this (assuming you have loaded psych) by typing at the console:
?principal
note the logical argument "scores".
Here is a small example:
##
require(psych)
require(GPArotation)
dat <- prin
Hi He Zhang,
>> Is the following right for extracting the scores?
>> ...
>> pca$loadings
>> pca$score
Yes.
But you should be aware that the function principal() in package psych is
standardizing your data internally, which you might not want. That is, the
analysis is being based on the correla
Hi,
I am also doing PCA.
Is the following right for extracting the scores?
library(psych)
pca<-principal(data,nfactors=,rotate="varimax",scores=T)
pca$loadings
pca$score
Best regards,
He
On Tue, Nov 30, 2010 at 10:22 AM, Liviu Andronic wrote:
> Dear all
> I'm unable to find an example of extra
Hi Liviu,
>> However, I'm still confused on how to compute the scores when rotations
>> (such as 'varimax' or other methods in GPArotation) are applied.
PCA does an orthogonal rotation of the coordinate system (axes) and further
rotation is not usually done (in contrast to factor analysis). Nei
Take 2 on this. Below I'm pasting the code to perform PCA in R
(without any rotation), manually; using ?princomp; and using
?principal. I also point out some differences in teh output and
terminology of the two functions. In short, I found how to compute the
scores of principal components when no r
PCA components are orthogonal by definition so no, that doesn't make
sense at all. Do yourself a favor and get a book on multivariate data
analysis. Two books come to mind: Obviously the one of Hair and
colleagues, called "multivariate data analysis" and easily found in a
university library (or on
On Fri, 2010-04-16 at 10:23 -0700, phoebe kong wrote:
> 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)
>
>
On 17.03.2010 00:16, Xanthe Walker wrote:
Hi,
I have successfully completed a PCA and printed the loadings, however,
numerous values are blank. I know that this means the values are just very
small but not equal to zero.
Is there a way to print out the loadings, including the very small value
Which principal component function are you using?
Check the documentation for that and look for the part of the object
that provides the PC's. Those are your loadings.
>>> Xanthe Walker 16/03/2010 23:16:47 >>>
Hi,
I have successfully completed a PCA and printed the loadings, however,
numerous v
On Wed, Mar 10, 2010 at 4:42 PM, Xanthe Walker wrote:
> Hello,
>
> I am trying to complete a PCA on a set of standardized ring widths from 8
> different sites (T10, T9, T8, T7, T6, T5, T3, and T2).
> The following is a small portion of my data:
>
> T10 T9 T8 T7 T6 T5 T3 T2 1.33738 0.92669 0.91146
I've found the functions in the psych package easier to use than the
built in functions for principal components analysis.
-Ista
On Sat, Jan 30, 2010 at 2:09 PM, ogbos okike wrote:
> Hi,
> I am learning how to do principal component analysis in R. However, since I
> am family with only a few bui
t$sample
pca <- prcomp (t(catopsis))
plot(pca, catopsis [])
summary(prcomp(catopsis))
biplot(prcomp(catopsis, scale = TRUE))
- Original Message -
From: Kevin Wright-5 [via R]
To: colin1
Sent: Monday, January 25, 2010 5:04 PM
Subject: Re: [R] PCA: Showing file datalabels
str(catopsis) shows no labels, so how can biplot know what to use?
Try this before call prcomp:
colnames(catopsis) <- c('a','b','c','d')
rownames(catopsis) <- cat$sample
Also, see the 'reshape' package for easier data manipulation.
Kevin
On Mon, Jan 25, 2010 at 10:39 AM, colin1 wrote:
>
> Th
After an off-list email exchange, it sounds like the pls package and Partial
Least Squares are appropriate for this analysis.
Kevin Wright
2009/11/4 Joel Fürstenberg-Hägg
>
> Hi all,
>
>
>
> I'm new to PCA in R, so this might be a basical thing, but I cannot find
> anything on the net about it
On Tue, 2009-09-29 at 17:02 +, Paul Dennis wrote:
> Dear all
>
> I have a data set for which PCA based between group analysis (BGA) gives
> significant results but CA-BGA does not.
>
> I am having difficulty finding a reliable method for deciding which
> ordination technique is most appropr
Hi Paul,
>> I have a data set for which PCA based between group analysis (BGA) gives
>> significant results but CA-BGA does not.
>> I am having difficulty finding a reliable method for deciding which
>> ordination
>> technique is most appropriate.
Reliability really comes down to you thinking
You can also use parallel analysis using the scree.plot function of the
"psy" package.
Regards,
Bruno
Bruno Falissard
INSERM U669, PSIGIAM
"Paris Sud Innovation Group in Adolescent Mental Health"
Maison de Solenn
97 Bou
At 18:22 25/03/2009, Jonathan Baron wrote:
On 03/25/09 19:06, soeren.vo...@eawag.ch wrote:
> 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 (o
Dear Sören, Mark, and Jon,
At 12:51 PM -0700 3/25/09, Mark Difford wrote:
Hi Sören,
(1) Is there an easy example, which explains the differences between
pca and pfa? (2) Which R procedure should I use to get what I want?
There are a number of fundamental differences between PCA and FA (Fa
Hi Sören,
>> (1) Is there an easy example, which explains the differences between
>> pca and pfa? (2) Which R procedure should I use to get what I want?
There are a number of fundamental differences between PCA and FA (Factor
Analysis), which unfortunately are quite widely ignored. FA is expli
On 03/25/09 19:06, soeren.vo...@eawag.ch wrote:
> 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
On Fri, Mar 06, 2009 at 09:46:17AM -, Ted Harding wrote:
> On 06-Mar-09 09:25:26, Prof Brian Ripley wrote:
> > You might want to look into correspondence analysis, which has several
> > variants of PCA designed for categorical data.
>
> In particular, have a look at the results of
>
> RSit
Hi Galandis,
dudi.mix() in package ade4 does PCA using categorical and/or quantitative
variables. Ordered cats are replaced by poly(x, deg=2). Squares of
categoricals can also be used. The method is a generalization by Chessel of
the method of Hill and Smith.
Regards, Mark.
Galanidis Alexandro
On 06-Mar-09 09:25:26, Prof Brian Ripley wrote:
> You might want to look into correspondence analysis, which has several
> variants of PCA designed for categorical data.
In particular, have a look at the results of
RSiteSearch("correspondence")
Ted.
> On Fri, 6 Mar 2009, Galanidis Alexandros
You might want to look into correspondence analysis, which has several
variants of PCA designed for categorical data.
On Fri, 6 Mar 2009, Galanidis Alexandros wrote:
Hi all,
I' m trying to figure out if it is appropriate to do a PCA having only
categorical data (not ordinal). I have only fin
Many apologies for the poor steer; you are quite right.
'fraid I hit 'send' before double-checking the help page myself. Next time...
S
>>> Gavin Simpson 16/02/2009 10:59 >>>
On Mon, 2009-02-16 at 10:45 +, S Ellison wrote:
> princomp uses the raw data and calculates the correlation or
> co
On Mon, 2009-02-16 at 10:45 +, S Ellison wrote:
> princomp uses the raw data and calculates the correlation or
> covariance matrix on the way to the PC's, so that doesn't use a
> correlation matrix itself. You do, however, get the choice.
That *isn't* what princomp() does. If you supply a vali
sqrt(svd(x)$d) maybe 2 more operations than princomp(covmat=x), but it
is hardly a chore.
On Feb 16, 9:15 pm, Mark Difford wrote:
> Hi Glen, Andrew,
>
> >> The PCA is just a singular value decomposition on a sample covariance/...
>
> I believe that Bjørn-Helge Mevik's point was that __if you read
princomp uses the raw data and calculates the correlation or covariance matrix
on the way to the PC's, so that doesn't use a correlation matrix itself. You
do, however, get the choice.
However, PC's are the eigenvectors of the correlation (or covariance) matrix,
so in principle calling eigen()
Hi Glen, Andrew,
>> The PCA is just a singular value decomposition on a sample covariance/...
I believe that Bjørn-Helge Mevik's point was that __if you read the
documentation__ you will see the argument "covmat" to princomp(). This,
really, is much more straightforward and practical than Andrew
The PCA is just a singular value decomposition on a sample covariance/
correlation matrix. Do a search for ?svd and get the eigenvalues and
vectors from that function.
On Feb 14, 10:30 am, "glenn" wrote:
> Hi All, would appreciate an answer on this if you have a moment;
>
> Is there a function (
"glenn" writes:
> 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()
Yes, there is: princomp(). :-)
--
Bjørn-Helge Mevik
_
PCA is only defined up to a multiplicative constant and different programs use
different constants. Without code or output we cannot tell if this is the
case, or if something more is going on. Try rescaling one of the answers to
see if you can get the other answer, if so, then it is just a dif
pletely trustworthy at this point, but SVD
> would be worth looking into.
> > Joe
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Noela Sánchez
> > Sent: Thursday, November 06, 2008 1:10 PM
> > To:
nal Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Noela Sánchez
> Sent: Thursday, November 06, 2008 1:10 PM
> To: stephen sefick
> Cc: r-help@r-project.org
> Subject: Re: [R] PCA
>
> My matrix have 436 registers and 518 variables. I need to do a
elp@r-project.org
Subject: Re: [R] PCA
My matrix have 436 registers and 518 variables. I need to do a PCA analyst.
Usually I use princomp command to perform PCA analyst, but this time i can't
because of my variables are more than my registers.
2008/11/6 stephen sefick <[EMAIL PROTECTED]&
My matrix have 436 registers and 518 variables. I need to do a PCA analyst.
Usually I use princomp command to perform PCA analyst, but this time i can't
because of my variables are more than my registers.
2008/11/6 stephen sefick <[EMAIL PROTECTED]>
> would you please provide a dummy example tha
Hi Noela,
Take a loot at ?prcomp
HTH,
Jorge
On Thu, Nov 6, 2008 at 1:42 PM, Noela Sánchez <[EMAIL PROTECTED]> wrote:
> I need perform PCA analyst with a matrix with more variables than units.
>
> The princomp command don't match with this matrix.
>
> Anybody knows a good command to do it?
>
?princomp refers you to prcomp for that case:
'princomp' only handles so-called R-mode PCA, that is feature
extraction of variables. If a data matrix is supplied (possibly
via a formula) it is required that there are at least as many
units as variables. For Q-mode PCA use 'p
would you please provide a dummy example that explains your problem.
Then maybe I can help you.
thanks
Stephen
On Thu, Nov 6, 2008 at 1:42 PM, Noela Sánchez <[EMAIL PROTECTED]> wrote:
> I need perform PCA analyst with a matrix with more variables than units.
>
> The princomp command don't match w
reproducible code - are you assigning the results to an object
On Thu, Oct 23, 2008 at 10:34 AM, Gianni Messeri
<[EMAIL PROTECTED]> wrote:
> Hi,
> I'm trying to perform a Principal Component Analysis on meteorological data
> with 10 predictors.
> I use the library pcaMethods to obtain a lot of in
Thanks everyone,
Paul
--
View this message in context:
http://www.nabble.com/PCA-and---variance-explained-tp19388970p19410675.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
pgseye wrote:
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
1 - 100 of 124 matches
Mail list logo