Skip to content
Prev 115 / 490 Next

Bug in ade4 randtest.amova and solution

Hello,

I am the maintainer for the poppr package, which depends on adegenet (and thus ade4). One of my users noticed a bug in the output of randtest.amova: https://groups.google.com/forum/#!topic/poppr/D1gpqgQM2F0

Basically, the alternate hypothesis for the randomization tests would be incorrect at every fourth hierarchical level. I contacted the maintainer and this bug has been fixed on the ade4 github page: https://github.com/sdray/ade4/pull/4

If you do run into this problem, there is a workaround by passing the result to as.krandtest()

n <- 3 # (set this to the number of hierarchical levels)
with(randomization_result, as.krandtest(sim, obs, alter = c("less", rep("greater", n)), call = call, names = names)

Cheers,
Zhian N. Kamvar