[R] PCA : Error in eigen(cv,
Daniel Malter
daniel at umd.edu
Wed Jul 2 03:24:40 CEST 2008
I could not find any of the other answers in my list. So I don't know what
the conversation was. Anyway, with the approach I suggested, it is no
problem to track which score/loading belongs to which sample because the
results were stored in an array. If you want to trace it back to the
bootstrapped data, you would have to store the data in an array as well.
Cheers,
Daniel
-------------------------
cuncta stricte discussurus
-------------------------
-----Ursprüngliche Nachricht-----
Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im
Auftrag von Tanya Yatsunenko
Gesendet: Tuesday, July 01, 2008 12:04 PM
An: r-help at r-project.org
Betreff: Re: [R] PCA : Error in eigen(cv,
Ok, the mistake was in the pca(x)<-princomp(SampleD[i,j]), should've used
pca(x)<-princomp(SampleD) instead.
Now, is there anyway to keep track of the matrix index, so in the end of all
PCAs, I can tell which score/loading belongs to which sample?
Thanks everyone!
On Mon, Jun 30, 2008 at 9:08 PM, Tanya Yatsunenko <yata25 at gmail.com> wrote:
> Hi all,
>
> I am doing bootstrap on a distance matrix, in which samples have been
> drawn with replacement. After that I do PCA on a resulted matrix, and
> these 2 steps are repeated 1000 times.
>
> pca(x) is a vector where I wanted to store all 1000 PCAs; and x is
> from 1 to 1000 SampleD is a new matrix after resampling;
>
> I am getting the following error message, which I don't understand:
> ....
> +pca(x)<-princomp(SampleD[i,j])
> + }
> Error in eigen(cv, symmetric = TRUE) : infinite or missing values in 'x'
>
> Should I maybe not use a vector, but matrix instead?
> Thanks!
>
> --
> Tanya.
>
>
--
Tanya
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list