Closed sciabola closed 7 years ago
We have no way of reproducing this, and none of the examples I tried had any problems. However, if a computer claims that there are missing values or NaN's, I believe the computer: it is much more pedantic than I. You also got more than 50 warnings: did you look at them and did they give any hints to solve your problem?
The na.rm
argument was added to vegan version 2.0-5 (Oct 8, 2012). Before that the missing values were not explicitly handled, and they may have been erroneously accepted.
The Warnings are simply as this?
mantel(xdis = xdata2.dists, ydis = x_model2.dists, method = "pearson", permutations = 9999)Pearson's product-moment correlationNANAc(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA [... truncated]
I am happy to attach my matrices here and see what you suggest. All the best.
Marco
Marco Gamba, PhD Dipartimento di Scienze della Vita e Biologia dei Sistemi - Life Sciences and Systems Biology Via Accademia Albertina, 13 10123 Torino, Italia mail: marco.gamba@unito.it mailto:marco.gamba@unito.it tel: (+39) 011-670-4560/4559
On 04 Nov 2016, at 10:03, Jari Oksanen notifications@github.com wrote:
We have no way of reproducing this, and none of the examples I tried had any problems. However, if a computer claims that there are missing values or NaN's, I believe the computer: it is much more pedantic than I. You also got more than 50 warnings: did you look at them and did they give any hints to solve your problem?
The na.rm argument was added to vegan version 2.0-5 (Oct 8, 2012). Before that the missing values were not explicitly handled, and they may have been erroneously accepted.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vegandevs/vegan/issues/215#issuecomment-258376342, or mute the thread https://github.com/notifications/unsubscribe-auth/AG36QfpErSC9nJ9bTsS7UAJTMQGK_yYZks5q6vTRgaJpZM4Ko04Z.
It may be better to send them off-list.
Thanks for the files that I got in email. This indeed fails, but I got more meaningful warnings:
50: In cor(permvec, ydis, method = method, use = use) :
the standard deviation is zero
The problem was that your second dissimilarities (x_model2.dists
) are constant (all == 1), and calculation of correlation fails when one of the variables is constant.
Are you sure you have earlier analysed these very same data? They should have failed earlier, and the failure should come from R stats
.
I have a script I have used hundred of times with vegan that computes a mantel test over 2 distance matrices. With version 2.4-1 it gives
No matter of what matrices I am using, including those who successfully worked in the past.