[R-sig-eco] interpreting adonis results

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Nov 25 10:59:25 CET 2011


On Fri, 2011-11-25 at 11:41 +0200, Jari Oksanen wrote:
<snip />
> Howdy Folks,
> 
> It seems that empty groups (count is zero) are the source of the
> problem. You can drop them using factor() command for your interaction
> -- this drops empty levels:
> 
> mod <- betadisper(betad, factor(groupA))
> 
> works for me.

droplevels() would be what the cool kids would use, just to be hip ;-)
It's new to recent versions of R (>= 2.13.0 IIRC). For factors it is
just a roundabout way of doing `factor(myfac)`:

> droplevels.factor
function (x, ...) 
factor(x)
<environment: namespace:base>

but there is a data.frame method which drops empty levels for all
factors in a data frame, and package authors can write other methods
which might become useful in various places in the future. So good to
know that `droplevels()` exists.

> However, like Gav said, this may not be a meaningful test (but still
> calls for a fix in vegan).

I'll take a look at adding a test/fix to vegan.

G

>  If I remember correctly, Marti Anderson had
> interactions in her software, but that was dropped from current
> versions. 
> 
> Cheers, jari oksanen
> 
> > > For the dune dataset, the above error occured. But for my data, the 
> > > interaction works. I wonder if i continue to use the new factor generated 
> > > from the factor-interaction for the betadisper, will it affects the 
> > > results? If this is wrong, what would be the recommended function to use?
> > 
> > I would need to check more carefully, but this may not be what Marti
> > Anderson's software would fit as an interaction model. I may be
> > misremembering, but IIRC PERMDISP can handle two-way ANOVA type models
> > within her framework and betadisper is not set-up for that. What you
> > have done is look at whether certain combinations of your two factors of
> > interest are more variable/dispersed than others. Which seems a
> > reasonable hypothesis to me.
> > 
> > G
> > 
> > > Sincerely Yours,
> > > J
> > > 
> > > On Nov 17 2011, Kay Cecil Cichini wrote:
> > > 
> > > >..to be save I would consider to exclude an effect due to different  
> > > >multivariate spread. See chapter 5.2, Homogeneity of groups and beta  
> > > >diversity, in the vegan tutorial at  
> > > >http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf.
> > > >
> > > >best,
> > > >kay
> > > >
> > > >
> > > >Zitat von Gavin Simpson <gavin.simpson at ucl.ac.uk>:
> > > >
> > > >> On Wed, 2011-11-16 at 03:43 +0100, Gian Maria Niccolò Benucci wrote:
> > > >>> Hi all,
> > > >>>
> > > >>> I had 84 samples collected in 7 different sites. In each sample were 
> > > >>> individuated the different fungal species and recorded. I would test if 
> > > >>> exist a real difference between the sites and if exist a sort of site 
> > > >>> effect that structure the fungal communities... Then, I did adonis test
> > > >>>
> > > >>> > adonis(community.sq ~ location, data=env.table, permutations=999)
> > > >>>
> > > >>> Call: adonis(formula = community.sq ~ location, data = env.table, 
> > > >>> permutations = 999)
> > > >>>
> > > >>>           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)
> > > >>> location   6    12.593 2.09886  6.8867 0.34922  0.001 ***
> > > >>> Residuals 77    23.467 0.30477         0.65078
> > > >>> Total     83    36.060                 1.00000
> > > >>> ---
> > > >>> Signif. codes:  0 *** 0.001 ** 0.01 * 0.05 . 0.1   1
> > > >>>
> > > >>>
> > > >>>
> > > >>> The significance is R2=0.349 at P=0.001 Can I assure that exist a 
> > > >>> strong site effect in structuring the communities in each site?
> > > >>
> > > >> Depends. The test is one of no effect of `location`. You have found
> > > >> evidence against this hypothesis and thus could reject this hypothesis,
> > > >> instead accepting the alternative hypothesis that there is an effect of
> > > >> `location`. As to the strength of this effect? ~35% of the sums of
> > > >> squares can be explained by `location`. Substantially more of the
> > > >> variance remains unexplained. As I know nothing about your subject area,
> > > >> I am unable to comment further on the strength of the relationship.
> > > >>
> > > >> Seeing as many ecologists whose work I read would say an effect is
> > > >> significant if the p-value was >= 0.05. Not that I subscribe to this way
> > > >> or working, but by that criterion, you have identified a significant
> > > >> `location` effect.
> > > >>
> > > >> HTH
> > > >>
> > > >> G
> > > >>
> > > >>>
> > > >>> Thanks for helping,
> > > >>>
> > > >>> G.
> > > >>>
> > > >>> 	[[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
> > > >> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
> > > >>
> > > >> _______________________________________________
> > > >> 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