[adegenet-forum] Large scale on PCA axes

Jombart, Thibaut t.jombart at imperial.ac.uk
Mon Sep 19 23:36:44 CEST 2011


Hello, 

nop, I don't think this is a problem. Differences with another implementation of PCA may indicated different scaling. glPca uses a centred, non-scaled PCA by default. Results can be checked against other implementations, for instance:
###
> x<-glSim(50,1e4)
> pca1 <- glPca(x,nf=2) # adegenet's glPca
> pca2 <- dudi.pca(as.matrix(x), scannf=FALSE,nf=2, center=TRUE,scale=FALSE) # ade4's dudi.pca

> head(cbind(pca1$scores,pca2$li))
             PC1         PC2      Axis1      Axis2
ind 1  4.7616076 -12.3876527  4.7616076 12.3876527
ind 2 -6.4254374   3.0950265 -6.4254374 -3.0950265
ind 3 -1.7796346   7.3292323 -1.7796346 -7.3292323
ind 4  6.3507325   0.7064251  6.3507325 -0.7064251
ind 5  6.8026920  -2.5432676  6.8026920  2.5432676
ind 6  0.4077185  -0.3060672  0.4077185  0.3060672
###

Apart from the sign which can always differ from one implementation to another, results are identical.

Cheers

Thibaut.


________________________________________
From: adegenet-forum-bounces at r-forge.wu-wien.ac.at [adegenet-forum-bounces at r-forge.wu-wien.ac.at] on behalf of Linda Rutledge [lrutledge at trentu.ca]
Sent: 19 September 2011 20:13
To: adegenet-forum at r-forge.wu-wien.ac.at
Subject: [adegenet-forum] Large scale on PCA axes

Hi,

I have produced several PCAs on a large SNP dataset using the "genlight" object and the glPca function. The new package is working great.

My concern is that in the PCAs I've produced, the scale on the PC1 (~13%) and PC2 (~3%) axes are very large (-30 to +30 on PC1 and -10 to +40 on PC2). This seems rather strange to me since most of my searching suggests typical axes ranges to be tenfold less and a similar analysis in a different program with differing groups has ranges -0.2 to 0.4. It does seems that most of the variation is explained in the first PC but this doesn't seem to change drastically with different groupings of the data.

Is it possible that the large range of the PCA suggests there is a problem in the dataset? or perhaps the analyses?

Thanks.

Linda
_______________________________________________
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