Skip to content
Back to formatted view

Raw Message

Message-ID: <8d7306a2-0e4f-464f-a9b7-4560814d3090@highstat.com>
Date: 2024-10-13T09:41:15Z
From: Highland Statistics Ltd
Subject: Using GLMs or GLMMs for diversity metrics?
In-Reply-To: <mailman.6841.5.1728727202.37180.r-sig-ecology@r-project.org>

>
>
> Today's Topics:
>
>     1. Using GLMs or GLMMs for diversity metrics?
>        (Barton, Alana Charlotte)
>     2. Re: Using GLMs or GLMMs for diversity metrics? (Michael Zyphur)
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 11 Oct 2024 18:25:38 -0400
> From: "Barton, Alana Charlotte" <acbarton at mun.ca>
> To: r-sig-ecology at r-project.org
> Subject: [R-sig-eco] Using GLMs or GLMMs for diversity metrics?
> Message-ID:
> 	<CAP+=Be1jJ_qrckg7TC8fd7NFbwU=8Z4fkUoX-itrgjeNzRDBMQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
> I would appreciate some help in a question regarding statistical analysis.
> I'm looking at species count data where sampling was carried out over
> multiple years in repeated sites. So each year was sampled at six different
> sites for example. The years were categorized into a temperature group with
> two factors:warm or cold. However, I'm only interested in exploring
> community differences between temp. groups and across years. I used the
> vegan package in R for calculating diversity metrics(abundance, richness,
> diversity index, evenness) and want to statistically check differences
> among metrics from factors of group and year.
> I have been using the manyglm-mvabund package with negative binomial
> distribution, but there is the issue that mvabund doesn't fit non-integer
> data well, and I'm worried its incorrectly computing diversity and evenness
> stats.  Additionally, I'm wondering if the repeated sites should be added
> as a fixed effect to mitigate this? Or if it's even considered a
> random effect actually and a mixed model is more appropriate, using glmmTMB
> instead in this case?  I'm not terribly familiar with using mixed models in
> R so any help is appreciated.
> Thank you for your help
>
> 	

Hello Alana,

Instead of using a diversity index, why not focus on the original 
species using a multivariate GLMM? You can use a generalised linear 
latent variable model (GLLVM) for this. That is a more useful analysis 
as compared to using 4 different diversity indices (which, by the way, 
are all derived from the same data, and that is a problem on itself).

You can find information of GLLVM here:

https://jenniniku.github.io/gllvm/articles/vignette1.html


Or you can join one of our upcoming online workshops on GLLVM:

https://www.highstat.com/Courses/Flyers/Flyer2024_01_SpatTempGLM.pdf

This workshop is in the EU time zone, but we are planning the same 
workshop in the 9 December week in the EST time zone.

The setup of the random effects structure and covariates were already 
discussed by Michael Zyphur, and can be applied in GLLVM as well.

Kind regards,

Alain







>