[R] eigen vector question
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri Feb 18 12:49:37 CET 2005
Jari Oksanen wrote:
> On Fri, 2005-02-18 at 11:26 +0100, Uwe Ligges wrote:
>
>>Jessica Higgs wrote:
>>
>>
>>>Sorry to bother everyone, but I've looked in all of the help files and
>>>manuals I have and I can't find the answer to this question. I'm doing
>>>principle component analysis by calculating the eigen vectors of a
>>>correlation matrix that I have that is composed of 21 parameters. I
>>>have the eigen vectors and their values that R produced for me but I'm
>>>not sure how to tell which eigen vector/value corresponds to which
>>>parameter because when R produces eigen vectors it does so in decreasing
>>>order of significance, meaning that the eigen vector that explains the
>>>most of the variance is listed first, followed by the next eigen vector,
>>>etc etc. Any help would be appreciated. Feel free to write back if you
>>>need more information on my problem. Thanks!
>>>
>>>______________________________________________
>>>R-help at stat.math.ethz.ch mailing list
>>>https://stat.ethz.ch/mailman/listinfo/r-help
>>>PLEASE do read the posting guide!
>>>http://www.R-project.org/posting-guide.html
>>
>>
>>Have you considered to use princomp()?
>>
>
> It is really weird that people always recommend using princomp, although
Well, the question was related to *eigenvalues*, hence princomp springs
to mind...
Uwe Ligges
> it is numerically inferior to prcomp and fails with rank deficit data.
> The natural solution would be to define functions:
>
> loadings <-
> function(x) UseMethod("loadings")
>
> loadings.princomp <-
> function (x) x$loadings
>
> loadings.prcomp <-
> function(x) structure(x$rotation, class="loadings")
>
> cheers, jari oksanen
More information about the R-help
mailing list