[R-sig-eco] Permutation: habitat diversity

Martin Wilkes m.wilkes at worc.ac.uk
Fri Dec 23 21:08:09 CET 2011


Hi Gavin,

Thanks for the reply, especially given the festive season!

As an example, say we have three sites and six habitat types in total (A-F):

Site 1: HabitatA 13; HabitatB 21; HabitatC 0; HabitatD 14; HabitatE 23; HabitatF 22
Site 2: HabitatA 1; HabitatB 7; HabitatC 9; HabitatD 23; HabitatE 19; HabitatF 2
Site 3: HabitatA 0; HabitatB 5; HabitatC 12; HabitatD 4; HabitatE 13; HabitatF 6

Can we do a pairwise comparison using a permutation test to evaluate the null hypothesis that habitat diversity is not significantly different between sites?  This seems to suggest a shuffling of the habitat scores between two sites at a time, but I have very little experience of hypothesis testing using this approach!  I hope I have explained it a little better now. Can you please help?

Merry Christmas to you and the family.

Martin
________________________________________
From: Gavin Simpson [gavin.simpson at ucl.ac.uk]
Sent: 23 December 2011 19:45
To: Martin Wilkes
Cc: r-sig-ecology at r-project.org
Subject: Re: [R-sig-eco] Permutation: habitat diversity

On Fri, 2011-12-23 at 18:41 +0000, Martin Wilkes wrote:
> We have counts of habitat types at three sites and want to permute the
> sets of counts between sites to get a distribution of habitat (H)
> diversity. We have tried several R functions (perm, sample, permtest)
> but none seems to do what we want.  We're happy writing the code to
> calculate the H distribution but need some help getting the
> permutations right if possible please.

Hi Martin,

Its not immediately clear to me what your data looks like nor what needs
to be shuffled and what doesn't. Could you expand, perhaps with a
simplified example or structure of data and how you want to shuffle it?

In the meantime, take a look at the permute package as it may do what
you want. If it doesn't I'd be interested in knowing how you want to
permute your data as it might be easy to add this sort of thing to
permute at a later date.

All the best,

Gavin

> Thanks
>
> Martin Wilkes
> University of Worcester
>
>       [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 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-sig-ecology mailing list