[R-sig-eco] Testing difference between diversity indices with vegan::oecosimu

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Apr 26 11:30:44 CEST 2012


On Thu, 2012-04-26 at 00:36 -0400, David Valentim Dias wrote:
> Hello Cichini,
> 
> I cannot help with your code but seems like you have a silly hypothesis.
> Think about it: Probability of two communities to be identical?
> You need to restate it in some more useful way. We already know most things
> are different but with what magnitude? Which factors are causing these
> changes? How these changes matter from the environment and us?

Surely if we knew the two things were different there would be no need
to test if they were? Most statistics assumes a Null model as we can say
something specific about the magnitude of the difference (it is zero)
and we can then see if the observations are consistent with that model.

I agree that subsequent analysis is required to understand why there are
differences, but we still need a mechanism to say, given the data
collected and the error processes, are the diversities of these two
"samples" the same?

G

> 2012/4/25 Chris Howden <chris at trickysolutions.com.au>
> 
> > Why not try some type of ANOVA style glm?
> >
> > Chris Howden
> > Founding Partner
> > Tricky Solutions
> > Tricky Solutions 4 Tricky Problems
> > Evidence Based Strategic Development, IP Commercialisation and
> > Innovation, Data Analysis, Modelling and Training
> >
> > (mobile) 0410 689 945
> > (fax / office)
> > chris at trickysolutions.com.au
> >
> > Disclaimer: The information in this email and any attachments to it are
> > confidential and may contain legally privileged information. If you are not
> > the named or intended recipient, please delete this communication and
> > contact us immediately. Please note you are not authorised to copy,
> > use or disclose this communication or any attachments without our
> > consent. Although this email has been checked by anti-virus software,
> > there is a risk that email messages may be corrupted or infected by
> > viruses or other
> > interferences. No responsibility is accepted for such interference. Unless
> > expressly stated, the views of the writer are not those of the
> > company. Tricky Solutions always does our best to provide accurate
> > forecasts and analyses based on the data supplied, however it is
> > possible that some important predictors were not included in the data
> > sent to us. Information provided by us should not be solely relied
> > upon when making decisions and clients should use their own judgement.
> >
> > On 26/04/2012, at 7:19, Kay Cichini <kay.cichini at gmail.com> wrote:
> >
> > > Hello all,
> > >
> > > I'd like to test if total diversity differs between two communities. For
> > > each community several samples were taken and abundances collapsed over
> > > groups to compute total diversity for each group. I tried to use
> > > vegan::oecosimu to test non-randomness of my statisitc (difference in
> > > Simpson-Diversity indices of collapsed abundances) - however, I am not
> > > quite sure if I oversee posssible pitfalls:
> > >
> > > library(vegan)
> > > data(dune)
> > >
> > > # a grouping variable:
> > > gr <- gl(2, nrow(dune)/2)
> > >
> > > divdiff <- function(x) abs(diversity(colSums(x[gr == "1", ]), "simp") -
> > >                           diversity(colSums(x[gr == "2", ]), "simp"))
> > > # testing function:
> > > divdiff(dune)
> > >
> > > oecosimu(dune, divdiff, "r2dtable", nsimul = 1999)
> > > # oecosimu with 1999 simulations
> > > # simulation method r2dtable
> > > # alternative hypothesis: true mean is not equal to the statistic
> > > #           statistic        z     2.5%      50% 97.5% Pr(sim.)
> > > # statistic   0.00275 -0.20996  0.00013  0.00280  0.01     0.98
> > >
> > >    [[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
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > R-sig-ecology at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> 
> 
> 
> _______________________________________________
> 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