[adegenet-forum] xvalDapc and Missing data

Jombart, Thibaut t.jombart at imperial.ac.uk
Wed Jul 31 10:41:09 CEST 2013


Hello, 

there is an illustration of how to replace NAs p17 of the "basics" vignette:
http://cran.r-project.org/web/packages/adegenet/vignettes/adegenet-basics.pdf

See 'scaleGen' and 'na.replace'.

Cheers
Thibaut



--
######################################
Dr Thibaut JOMBART
MRC Centre for Outbreak Analysis and Modelling
Department of Infectious Disease Epidemiology
Imperial College - School of Public Health
St Mary’s Campus
Norfolk Place
London W2 1PG
United Kingdom
Tel. : 0044 (0)20 7594 3658
t.jombart at imperial.ac.uk
http://sites.google.com/site/thibautjombart/
http://adegenet.r-forge.r-project.org/
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Ryan Daniels [jryan.daniels at gmail.com]
Sent: 30 July 2013 21:12
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] xvalDapc and Missing data

Hey
(Windows Vista, R 3.0.0)
I've read in a genepop file with microsatellite data (diploid, 9 loci, 120 samples, 8 populations) and coverted it to genind.

I was trying to use the xvalDapc function but I received the following error message:

Error in dudi.pca(x, nf = n.pca.max, scannf = FALSE, center = center,  :
  na entries in table

I've checked, there are "NA"s and they correspond to my samples with missing data.
I couldn't find anything on the web on how to deal with missing data for this function but I saw  Thibaut suggested replacing NA's with uninformative mean values.
here: http://r.789695.n4.nabble.com/PCA-with-NA-td840762.html

 Would this solution be permissible for this function and this type of data?

Thank you in advance
Ryan


More information about the adegenet-forum mailing list