On 30Nov 2018, at 21:21, Vasco Silva <silvadavasco at gmail.com> wrote:
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 at gmail.com <mailto:mollieebrooks at 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 at gmail.com <mailto:silvadavasco at gmail.com>> wrote:
Hi,
I am trying to fit a GLMM on percent cover for each plant species:
'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]]