gbradburd/conStruct

Error in check.data.partitions.covmats(args)

Closed this issue · 8 comments

Hi,

I try to run the cross validation analysis the following error pop up:
Error in check.data.partitions.covmats(args) :
you have specified an invalid data partition "data" element is not positive definite.

these the code:
my.xvals <- x.validation(train.prop = 0.9, n.reps = 10, K = 1:5,
freqs = freqs,
data.partitions = NULL,
geoDist = geoDist, coords = coords,
prefix = "Crau_K1_5", n.iter = 1000,
make.figs = FALSE, save.files = TRUE,
parallel = FALSE, n.nodes = 1)

Please, can you help what is going on error? thank you in advance,

r

Hi Ruth,

Please see #20 (comment) or #21 (comment) about dealing with nonpositive-definite issues. If that doesn't resolve it, please attach or email your allele frequency data as a .txt data table and I'll take a look.

-Gideon

Looks like the file failed to attach.

here is the file
freqs.txt

Hi Ruth,

Yes, it looks like the problem is lots of missing data. Your dataset appears to have 49% missing data total, and, of your 64 samples, 28 have greater than 50% missing data. I would recommend one of the following approaches:

  1. try dropping loci and/or samples with large amounts of missing data until conStruct runs for you.
  2. it looks like your samples are in different populations (e.g., "ArrNeg1"..."ArrNeg7", "CINvLi1"..."CINvLi8"), so, depending on the spatial scale of the sampling, you could try collapsing some of the individuals from the same population into a single, multi-individual sample in the hope that it would ameliorate some of your missing data problems. I describe that procedure in #21 (comment).

Hope that helps,
-Gideon

Hi Gideon,
Thanks, I gonna try if and I'll see if that works! Thanks!,
r

Hi Ruth - is this issue still unresolved for you? If not, I'll go ahead and close it out.