5
$\begingroup$

Currently I try to fit a model for counted Individuals (response variable, integer numbers) in

Different types of traps (factorial explanatory variable).

I have two different Biotopes, and three Locations in each of both

On one day I placed the three traps in Biotope 1, every Trap at one of the three Locations, this was done three times so every Trap was used one time at every Location in the first Biotope. The same procedure followed for the second Biotope, so there were six days in round 1.

This was repeated in round 2 so every trap was runned two times in every Location

A table of the experimental design is added.

At every day the Humidity and Temperature in the Biotope was also measured.

So I would ask if this model will be correct to

  1. prevent pseudoreplication because of the repeated experiments (2 rounds)

  2. take into account that the Locations are nested within the Biotopes:

 glmer( Individuals ~ Trap + Location + Temperature + Humidity + 
       (1|Biotope/Location) + (1|round), family=quasipoisson)  

Another table of the independent variables is added. (To prevent any confusion I assigned new numbers to the Locations. The Locations within Biotope 1 are 1,2,3 - the Locations in Biotope 2 are 4,5 and 6) and Temperature is excluded since it was not significant anymore.

Temperature and Humidity are day-level predictor variables?

Yes, they were measured each Day in the Biotope where the experiment was conducted

Within each Day, it looks like you consider different locations, so Location can be treated as a random grouping factor and provided the locations you selected are intended to be representative of a larger set of locations

The Locations are constantly the same three ones within Biotope 1 and the other three ones within Biotope 2. They were chosen before the experiment started and did not change.

does it include in your study all possible levels you are interested in?

Yes, for this study Biotope 1 and Biotope 2 are the only ones. But I could also have chosen other 2 ones befor the whole experiment started. So I think it can be treated as random.

For Trap too, you would have to determine whether to consider it nested within/partially crossed with/fully crossed with Location,

the whole experiment was conducted with the same three Traps I used everyday. So I think they can not be treated as nested? The difference between the three Traps is the issue I am mostly interested in.

So far the model looks like this (the Interpretation of - exp(0.02459) and not exp(-0.02459 ) of the Estimate for Humidity is correct?)

    > summary(model1)
       Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: Negative Binomial(21.0762)  ( log )
Formula: Ind ~ Trap + Humidity + (1 | Biotop/Location) + (1 | Round)
   Data: Dummy

     AIC      BIC   logLik deviance df.resid 
   322.2    334.9   -153.1    306.2       28 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.42508 -0.73084  0.08929  0.49095  2.37852 

Random effects:
 Groups          Name        Variance  Std.Dev. 
 Location:Biotop (Intercept) 5.405e-02 2.325e-01
 Biotop          (Intercept) 2.437e-10 1.561e-05
 Round           (Intercept) 4.511e-03 6.717e-02
Number of obs: 36, groups:  Location:Biotop, 6; Biotop, 2; Round, 2

Fixed effects:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  5.51280    0.40310  13.676  < 2e-16 ***
Trap2        0.12104    0.10659   1.136  0.25614    
Trap3        0.34146    0.10557   3.235  0.00122 ** 
Humidity    -0.02459    0.00575  -4.276  1.9e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
         (Intr) Trap2  Trap3 
Trap2    -0.154              
Trap3    -0.103  0.516       
Humidity -0.946  0.020 -0.036
convergence code: 0
boundary (singular) fit: see ?isSingular 

table_Variables

experimental design

$\endgroup$

2 Answers 2

4
$\begingroup$
  • Adding (1|round) as a random effect to prevent pseudoreplication is right, a good article about this subject can be found here.
    To ensure your model assumes everything correct you could compare the df’s of your model summaries and check if they take account for your pseudoreplicates and are therefore lower in the model with round as a random effect.

  • The Term (1|Biotope/Location) is also correct for adding a nested structure, but you should then remove Location as a fixed effect, a good post about this is from @JoeKing Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?
    Another possibility writing it down would be (1|Biotope) + (1|Biotope:Location)

So your final model should look like that:

Individuals ~ Trap + Temperature + Humidity + (1|Biotope/Location) + (1|round)

Other than that your model looks fine to me, you could consider if there are any additional interactions, maybe between Location and Temperature (1|Location:Temperature) and try adding them to the model

$\endgroup$
3
  • $\begingroup$ Thank you a lot for your comment. I appreciate it a lot. So I trid to add the additional interactions but they do not change a lot. $\endgroup$
    – J_Biology
    Oct 19, 2020 at 14:57
  • 1
    $\begingroup$ @J_Biology If they don't improve your model significantly and you don't expect interaction effects due to your experimental design than it is better to leave them out since it would only make your model unnecessarily complicated $\endgroup$ Oct 20, 2020 at 16:31
  • 1
    $\begingroup$ About your new model, I think you implemented @IsabellaGhement suggestions quite well, removing Tempreature because of no significant effect is ok, i would only suggest to add day as a nested effect in round as shown in your table so your model would be Ind ~ Trap + Humidity + (1 | Biotop/Location) + (1 | Round/Day). Since you want to observe the effect of traps it has to be a fixed effect. You may also create different models and compare them with anova(m1, m2, etc.) and use the AIC as an indicator for fit and selecting your right model. $\endgroup$ Oct 20, 2020 at 16:50
4
$\begingroup$

Nice answer from Thomas! I think we may need some more information though before finalizing a modelling approach. For example, the currently proposed model ignores the fact that the response variable was collected on different days.

One way I would think about this modelling exercise is like this:

We start out with 2 rounds of experiments, so Round can be treated as a random grouping factor sitting at the top level of your data hierarchy. (Note, however, that a rule of thumb suggest that one should have at least 5 levels for a random grouping factor, whereas you only have 2.)

Within each round, you consider multiple days. So Day could be considered a random grouping factor nested within Round (since the days are specific to each round.) It sounds like Temperature and Humidity are day-level predictor variables?

Within each Day, it looks like you consider different locations, so Location can be treated as a random grouping factor and provided the locations you selected are intended to be representative of a larger set of locations. If the locations are different from one day to the next within an experimental round, then Location would be nested within Day. If there is some overlap among locations across days within the same experimental round, then Location and Day would be partially crossed random grouping factors. If locations are the same across all days, then Location and Day would be fully crossed random grouping factors.

We don't know enough about Biotope - does it include in your study all possible levels you are interested in? Or have you selected just some of its possible levels for inclusion in your study? If the latter, then perhaps you could consider Biotope as a random grouping factor nested within/partially crossed with/fully crossed with Day, and Location as a random grouping factor nested within/partially crossed with/fully crossed with Biotope.

For Trap too, you would have to determine whether to consider it nested within/partially crossed with/fully crossed with Location, depending on whether traps are totally different from one location to the next (nested), some but not all traps are the same across locations (partially crossed) or traps are the same from one location to the next (fully crossed).

Basically, you have to go from the top to the bottom level of your data hierarchy and decide what makes most sense in terms of modelling options for each level.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.