*Bounty: 50*

*Bounty: 50*

My understanding of a random effect is based on this paper, specifically this definition:

(Bolker et al., 2009)Random effects:factors whose levels are sampled from a larger

population, or whose interest lies in the variation among them rather

than the specific effects of each level.

In ecology random effects seem to be mostly used to avoid (psuedo-)replication from repeated measures, for example sampling from the same location repeatedly, or to account for phylogeny i.e. that closely related species are more likely to be similar due to shared evolutionary history.

This seems to me to be only a restricted application of a random effect, based on the above definition. The Bolker definition says to me that treating a variable as a random effect will control for unmeasured differences between sampling units that may affect the variables I’m interested in. Is this correct?

Say I have a study where I’m interested in measuring `variable X`

. My sampling design involves `paired`

sampling at a number of different `locations`

(not repeated), on different `dates`

. `Pairs`

would be random effects, to avoid repeated measures as discussed above. What about `location`

and `date`

? I’m not interested in the differences between `locations`

or `date`

, only `variable X`

. In fact, I’d like to control for the differences between `location`

and `date`

to get a better understanding of the effect of `variable X`

on my response. Would treating `location`

and `date`

as random effects accomplish this? I.e.:

```
Response ~ X + (1|location/pair) + (1|date)
```