[R-sig-ME] Fitting GLMM to percent cover data with glmmTMB

Vasco Silva @ilv@d@v@@co @ending from gm@il@com
Fri Nov 30 21:21:30 CET 2018


Thanks Mollie.

I convert % cover to relative abundance using "decostand" function and fit
the GLMMM but it seems to lack something:

> sp1.glm1<-glmmTMB(sp1~Grazing+(1|Plot),zi=~0, data=cover,
+                        family=beta_family(link ="logit"))
Error in eval(expr, envir, enclos) : y values must be 0 < y < 1

Cheers.

Vasco

Mollie Brooks <mollieebrooks using gmail.com> escreveu no dia sexta, 30/11/2018
à(s) 11:21:

> Hi Vasco,
>
> I mostly agree with what Scott Foster said over on R-sig-eco to your
> earlier question:
>
> > I agree with Zoltan that bionimial is probably inappropriate, for the
> reasons he stated.
> >
> > I'm not sure that Tweedie is your solution though -- it is defined for
> non-negative real numbers.
> >  Not just those between 0 and 100%.  Perhaps easiest to think of fish
> biomass caught in a net (can
> > be zero, or more.
> >
> > Tweedie might work though, if your percentages are typically nowhere
> near the 100% boundary.  In
> > this case, the upper end of the support is kind of immaterial...  You
> hope...
> >
> > Does glmmTMB supply a beta distribution?  Zero-inflated beta?  The
> quantile regression idea might be
> > useful too, as Brian suggested, but I'm not sure about random effects in
> that case.  Beta regression
> > will also have problems with exactly 0% (or 100%) observations.
>
> I would convert percentages to the 0-1 scale and then try a zero-inflated
> beta distribution. The Tweedie makes more sense if your response variable
> is the sum of a bunch of positive values like body weights.
>
> You can do a GLMM with a zero-inflated beta distribution in glmmTMB with
> something like
>
> m1 <- glmmTMB(sp1 ~ Grazing + (1|Plot), zi=~1, data=cover,
> family=beta_family())
> m2 <- glmmTMB(sp1 ~ Grazing + (1|Plot), zi=~ Grazing, data=cover,
> family=beta_family())
>
> cheers,
> Mollie
>
>
> > On 29Nov 2018, at 22:24, Vasco Silva <silvadavasco using gmail.com> wrote:
> >
> > Hi,
> >
> > I am trying to fit a GLMM on percent cover for each plant species:
> >
> >> str(cover)
> > 'data.frame': 100 obs. of  114 variables:
> > $ Plot : Factor w/ 10 levels "P1","P10","P2",..: 1 1 1 1 1 3 3 ...
> > $ Sub.plot: Factor w/ 5 levels "S1","S2","S3",..: 1 2 3 4 5 1 2 ...
> > $ Grazing : Factor w/ 2 levels "Fenced","Unfenced": 1 1 1 1 1 1 1  ...
> > $ sp1 : int  0 0 0 1 0 0 1 ...
> > $ sp2 : int  0 0 0 0 0 3 3 ...
> > $ sp3 : int  0 1 0 0 1 3 3 ...
> > $ sp4 : int  1 3 13 3 3 3 0 ...
> > $ sp6 : int  0 0 0 0 0 0 0 ...
> > ...
> > $ tot  : int  93 65 120 80 138 113 ...
> >
> > I was wondering whether the GLMM can be fitted with glmmTMB (tweedie
> > distribution) and if so, should I use percent cover or percent cover
> > converted to relative abundance?
> >
> > sp1.glmm <- glmmTMB (sp1 ~ Grazing + (1|Plot), data=cover, family=tweedie
> > (link ="logit"))
> >
> > Any advice would be very much appreciated.
> >
> > Cheers.
> >
> > Vasco Silva
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list