Skip to content
Prev 279194 / 398506 Next

partial mantel tests in ecodist with intential NA values.

I would like to perform partial mantel tests  on only within group values, with "between group" values assigned to NA.
This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error.

is it possible to perform this test in ecodist?

many thanks

Nevil Amos
mantelr      pval1      pval2      pval3  llim.2.5% ulim.97.5% 
0.09014696 0.10300000 0.89800000 0.18400000 0.01857311 0.18468621
$MantelR
        r12         r13         r23       r12.3       r13.2 
 0.08977575  0.02170997 -0.01561346  0.09014696  0.02320821 

$p
[1] 0.09590410 0.30769231 0.47552448 0.09490509 0.30169830

$call
[1] "partial.mantel.test(M1 = M1, M2 = M2, M3 = M3, quiet = T)"

attr(,"class")
[1] "partial.Mantel"
Error in mantel(D1 ~ D2 + D3, nperm = 1000) : Matrix not square.
$MantelR
         r12          r13          r23        r12.3        r13.2 
 0.054906562  0.003446670 -0.015613460  0.054967403  0.004310979 

$p
[1] 0.2837163 0.4275724 0.4555445 0.2857143 0.4235764

$call
[1] "partial.mantel.test(M1 = M1, M2 = M2, M3 = M3, quiet = T)"

attr(,"class")
[1] "partial.Mantel"
Warning message:
In partial.mantel.test(M1, M2, M3, quiet = T) :
  Missing values exist; Pairwise deletion will be used