I've been trying to build a distribution map for certain species using distance methods. I am having difficulty getting results via Mahalanobis Distance. The package that has this function is dismo
, which is expressed as mahal
.
When entering with the data the console returns me that:
Error in solve.default(var(x)) :
sistema é computacionalmente singular: condição recíproca número = 3.14572e-20
Searching, I found information that the error occurs when the array can not be reversed, and / or with when covariance value is close to zero. However I can not find a way to solve this problem. I tried to understand the problem, and I wonder if there are mathematical manipulations to get around the error?
Thanks for the help.
A sample of the data follows.
head na matrix:
alt bio1 bio5 bio6 bio7 bio9 bio10 bio12 bio18 bio19 footprint luzworld
1 51 275 395 178 217 284 326 40 4 2 14.00000 0
2 15 277 396 181 215 285 327 42 4 2 14.00000 0
3 136 270 390 172 218 280 321 39 5 2 12.04751 0
4 94 273 393 175 218 282 324 40 5 2 14.06253 0
5 52 275 395 178 217 284 326 40 3 2 14.00000 0
6 245 265 385 165 220 275 316 39 6 2 7.00000 0