[R] monte carlo simulations in permanova in vegan package

Jari Oksanen jari.oksanen at oulu.fi
Thu Oct 29 14:23:12 CET 2015


Sean Porter <sporter <at> ori.org.za> writes:

> I am trying to run a PERMANOVA in the vegan package with an appropriate
> number of permutations (see example below), ideally 9999. Obviously that
> number of permutations does not exists so I would like to use Monte Carlo
> permutation tests to derive the probability value, as is done in the
> commercial package PERMANOVA+ for PRIMER. How can I adapt my code so that
> adonis will do so ? Many thanks, Sean
[...clip...]
> 
> > permanova <- adonis(species ~ time, data = time, permutations=999,
> method="bray")
> 
> 'nperm' > set of all permutations; Resetting 'nperm'.
> 
I assume we are talking about the latest version of vegan and permute
packages. In that case you really should switch to complete enumeration
if you request exceeds the number of distinct permutations. As people
have told you, you should be satisfied with that because there are no
more distinct permutations. Alternatively, you need more data.

If you mean by Monte Carlo that the same that you have a sampling with
return instead of permutation, or that the same observation can appear
several times and therefore some other unit is missing, then there are two
pieces of advice:

1. You should not do so.
2. If you want to do so, you can generate your resampling matrices
by hand and use that matrix as the argument of permutations=. See
the documentations (?adonis) which tells how to do so.

Cheers, Jari Oksanen



More information about the R-help mailing list