On Thu, 14 Feb 2008, SNN wrote:

>
> Thanks for the advice.
>
> I tried to find the cov of my matrix using R and it ran out of memory.

How did you do this? The covariance matrix is only 115x115, so it 
shouldn't run out of memory
   cov(t(code))
should work

If that doesn't work then
   tcrossprod(code)/300000 - tcrossprod(rowMeans(code))
might.

> I am
> not sure how to do double loop to create the covariace matrix?  Also is
> doing prcomp( covariace matrix) the same as finding
> prcomp( original data ,matrix of snps)?

That's the point of the paper behind the EIGENSTRAT software, which is 
worth reading.  The eigenvalues are the same and the eigenvectors are 
related.  One way around gives the left singular vectors of the data 
matrix, the other gives the right singular vectors.


        -thomas

Thomas Lumley                   Assoc. Professor, Biostatistics
[EMAIL PROTECTED]       University of Washington, Seattle

______________________________________________
R-help@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.

Reply via email to