[adegenet-forum] xcal/optim.a.score consistency

Alexandre Lemo alexandros.lemopoulos at gmail.com
Thu Sep 29 11:02:37 CEST 2016


Dear Dr. Jombart and *adegenet* users,

I am trying to run a DPCA on a dataset of 3975 SNPS obtained through RAD
sequencing. Tere are 11 populations and 306 individuals examined here
(minmum 16 ind /pop). Note that I am not using the find.cluster function.

My problem is that I can't get any consistency in the number of PC that I
should use for the DPCA. Actually, everytime I run *optim.a.score* or *xval*,
I get different results. I tried changing the training set (tried 0.7, 0.8
and 0.9) but still the optimal PC retained change in each run.


Here is an example of my script:

#str is a genind object



*optim_PC <- xvalDapc(tab(str, NA.method = "mean", training.set =0.9),
pop(str),                               n.pca = 5:100, n.rep = 1000,
                              parallel = "snow", ncpus = 4L*






*optim_PC_2<- xvalDapc(tab(str, NA.method = "mean", training.set =0.9),
pop(str),                               n.pca = 5:100, n.rep = 1000,
                              parallel = "snow", ncpus = 4L*What happens
here is that optim_PC will give me an optimal PC of (e.g) 76 while
optim_PC_2 will give me 16. I tried running this several times and
everytime results are different.


I also tried using optim.a.score() :



*dapc.str <- dapc(str, var.contrib = TRUE, scale = FALSE, n.pca = 100,n.da
= NULL)*
*optim.a.score (dapc.str)*

Here, the number of PC will change everytime I run the function.


Does anyone have an idea of why this is happening or had several issues? I
am quite confused as results obviously change a lot depending on how many
PC are used...

Thanks for your help and for this great adegenet package!

Best,

Alexandre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160929/3253967f/attachment.html>


More information about the adegenet-forum mailing list