[R] restricted permutations in permtest()?

Gavin Simpson gavin.simpson at ucl.ac.uk
Tue Jan 19 13:46:38 CET 2010


On Tue, 2010-01-19 at 11:39 +0100, Kay Cecil Cichini wrote:
> Hallo List,
> 
> I'm trying to implemement a restricted permutation scheme in
> permutest(). More
> precisely I have dependence in my data that should be allowed for in
> the
> permutation - I simulated the problem in the example of the vegan
> documentation
> p.24:
<snip />
> 
> ##the unrestricted Permutation test for F is
> permutest(mod, pairwise = TRUE)
> 
> 
> ..I wasn't able to find out the right syntax for implementation of
> blocks, I
> tried with argument strata, which would be blocks, in permutest(mod,
> pairwise =
> TRUE, blocks) but this doesn't work. By the way, what is 'pairwise =
> TRUE' for?

This looks like you haven't really read or understood the help for
permutest.betadisper?

If you had, you'd have noticed that this method doesn't (currently)
support the 'strata' argument and because you didn't name the argument
you supplied 'blocks' to, this would have gone to argument 'control' and
that should have resulted in an error.

You can't implement a restricted permutation for any model in vegan at
the moment, unless you fancy hacking the code. Work is in progress to
implement for vegan the type of dependence structures available in
Canoco. I produced a new package 'permute' that is available on r-forge:

http://r-forge.r-project.org/R/?group_id=68

(within the vegan stable) to do those kinds of restricted permutations,
but this is very much at alpha status at the moment as some aspects of
the code just don't work. There is enough there to generate a restricted
permutation of a dataset, but not the extra checking code.

If you can explain what kind of dependence structure you have in your
data perhaps I can help with a bespoke version of permutest.betadisper
until permute is ready for release, but if you do so, please move this
to a thread on the r-forge vegan help forum:

http://r-forge.r-project.org/forum/forum.php?forum_id=194

'pairwise = TRUE' indicates that you also want pairwise comparisons of
group variances. I.e. if you have 3 groups, pairwise = FALSE would only
give an overall analysis (one p-value) for differences in variances
across all groups, where as pairwise = TRUE conducts tests of the
difference between group 1 and 2, between group 1 and 3, and between 2
and 3, as well as the overall analysis.

HTH

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list