[R-sig-ME] GLMM for repeated measures in space and time series

Ben Bolker bbolker at gmail.com
Thu Sep 11 02:30:38 CEST 2014


Just a quick comment:

On Wed, Sep 10, 2014 at 7:59 PM, Chris Howden <chris at trickysolutions.com.au>
wrote:

> Hi Barbara,
>
> The SD explained by your random effects is very small, it actually
> looks to be 0 for station! So you may not need them at all, or at
> least not the station one.
>

  But this may not be worth worrying about until after you've sorted out
the correct model syntax (see below).


>
> Also although your raw seed eaten data does follow a binomial
> distribution you aren't modelling the counts ie number of seeds
> predated. You are modelling the percentage predated, which is why you
> are getting the warning message saying your response isn't an integer.
> I'm not entirely sure how glmer handles this, it may be rounding your
> percentages to the nearest integer, or may not be.


  It doesn't round, but the answers may not make sense.


> You may want to
> consider modelling the actual percentages using some other model
> better suited to this? Possible a beta distribution (although I don't
> think they can handle 0 and 100‘s, but that can be solved by
> adding/subtracting a very small amount). Or maybe even modelling the
> weight consumed? Or even splitting it into 3 (or more) categories ie
> all eaten, non eaten, some eaten.
>

  These are all possible, but the most-likely-correct solution is to
specify the total number exposed at any given time in the 'weights'
argument, and/or specify the response variable as cbind(eaten,not_eaten)


> 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
>

[snip]


> > On 11 Sep 2014, at 0:42, "Bárbara Baraibar Padró" <
> barbara.baraibar at udl.cat> wrote:
> >
> > Hello,
> >
> > I'm trying to choose the correct model to analyze my data and I need
> some help. I'm measuring seed predation (I leave 1 gram of seeds for 48 in
> the field and after 48 hours I take what is left and weigh it again). I do
> this in the same 50 petri dishes (stations), 25 of which have one weed
> species and the other 25 have another and repeat the same in 3 different
> fields during 3 months. So, I have a nested design with:
> >
> > Fixed effects: Weed_species, Date (time)
> >
> > Random effects: Station, Field
> >
> > My results are a bit weird in the sense that I have a lot of dishes with
> 100% seeds predated and some with 0% predated and few in the middle.
> >
> > My boss says that my response variable follows a binomial distribution
> because each seed can be either predated or not, so I have constructed a
> response variable with a success column (seeds_predated/initial_seedweight)
> and a failure column (initial_seedweight-seeds_predated)/initial_seedweight
> >
> > I have tried a GLMM like the one below and I would like to know if the
> model is ok for this kind of data (repeated measures in space and in
> different times) and how I can validate the model. I have done a Binned
> residuals plot and almost all my residuals fit within the intervals, do I
> need to do something else?
> >
> > Thank you very much!!!
> >
> > success<- seeds_predated/initial_seedweight
> >
> > failure <- (initial_seedweight-seeds_predated)/initial_seedweight
> >
> > resposta<- cbind (success, failure)
> >
> > GLMM1<-glmer(resposta ~ Weed_species + Data + (1|Station/Field),
> family=binomial)
> >
> > Warning message:In eval(expr, envir, enclos) : non-integer counts in a
> binomial glm!
> >
> > Generalized linear mixed model fit by maximum likelihood
> ['glmerMod']Family: binomial ( logit )Formula: Depredacio ~ Especie + Data
> + (1 | Station/Camp)
> > AICBIClogLikdeviance
> > 479.6651501.8878 -233.8326467.6651
> >
> > Random effects:
> > GroupsNameVarianceStd.Dev.
> > Camp:Station (Intercept) 5.036e-10 2.244e-05
> > Station(Intercept) 0.000e+00 0.000e+00
> > Number of obs: 300, groups: Camp:Station, 100; Station, 50
> >
> > Fixed effects:
> >     Estimate Std. Error z value Pr(>|z|)
> > (Intercept)-0.41330.1787-2.3130.02072 *
> > EspecieLolium0.50080.21002.3850.01709 *
> > Data2-0.84620.2681-3.1560.00160 **
> > Data30.74700.25412.9400.00328 **
> > ---Signif. codes:0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' '1
> >
> > Correlation of Fixed Effects:
> > (Intr) EspcLl Data2
> > EspecieLolm -0.600
> > Data2-0.404 -0.037
> > Data3-0.4730.0380.299
> >
> > --
> > Barbara Baraibar Padro
> > ETSEA- Universitat de Lleida
> > Dep. Hortofruticultura, Botanica i Jardineria
> > Av. Rovira Roure 191
> > 25198 Lleida (Spain)
> > Telf: +34 973 702912
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> _______________________________________________
> R-sig-mixed-models at 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