[adegenet-forum] Extracting vectors in glPca

Antoine Paccard antoinepaccard at gmail.com
Mon May 30 16:38:06 CEST 2016


Hi Roman,

Thanks for your answer. I did look into this before sending over this message and here is how I understand it:

in princomp() or prcomp(), eigenvectors can be extracted using $loadings or $rotation respectively. with glpca(), $loadings gives the matrix of loadings of each SNPs on each PC. Loadings and eigenvectors are not the same. The eigenvectors give directions while the loadings include variance along these directions. For example, one could decide to scale eigenvectors with the loadings.

Here, I am more interested in the eigenvectors themselves and not necessarily in the loadings of each SNP. Instead, I have eigenvalues for each individuals (lets say 10, with glpca(x)$eig) and would like to extract the eigenvectors associated with these eigenvalues, such as: A(vec) = λvec where λ is the eigenvalue associated to the eigenvector ‘vec’.

Does that make sense or am I missing something?

Thanks,
Antoine

> On 30 May 2016, at 07:35, Roman Luštrik <roman.lustrik at biolitika.si> wrote:
> 
> Hi,
> 
> think about this for a bit. What would be the analogous thing to extract from either princomp() or prcomp() in base R?
> 
> Cheers,
> Roman
> 
> ----
> In god we trust, all others bring data.
> 
> ----- Original Message -----
> From: "Antoine Paccard" <antoinepaccard at gmail.com>
> To: adegenet-forum at lists.r-forge.r-project.org
> Sent: Wednesday, May 25, 2016 10:28:43 PM
> Subject: [adegenet-forum] Extracting vectors in glPca
> 
> Hello,
> 
> I was just wondering if there was an easy way to extract vectors from glPca. I guess those can be found using $scores and &eig informations. But just in case, I would like to know if there was a command such as $vectors than could extract the actual eigenvectors.
> 
> Thanks,
> Antoine
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum



More information about the adegenet-forum mailing list