[R-sig-ME] partially crossed model

Ben Bolker bbolker at gmail.com
Thu Mar 14 18:17:55 CET 2013


Alexej Siren <asiren at ...> writes:

> 
> Hello,
 
> I'll try to make this more succinct.  

  Thanks ...

> I'm working with longitudinal
> data and having difficulty understanding the correct formulation for
> a partially crossed random effects model.


> 
> I'm evaluating 2 competing hypotheses.

> 1) marten use (detections/day) of high elevation habitat is seasonal
> and/or 2) construction and wind farm operation affects marten use of
> high elevation habitat.

  These aren't really competing, are they ("and/or")?  Although
I guess they might be 'competing' in the sense that they each
produce similar patterns in the data ... so the parameters that
describe each phenomenon are negatively correlated ...

> -These time periods overlap i.e., construction activities occurred
> in winter and summer and vary in length (42 - 163 days).  

> -Marten come in and out of the study but need to be monitored for at
> least 2 seasons/3 construction periods.  Also, marten contribute
> differently depending on the amount of high elevation habitat within
> their home range.
 
> So far my formula has been:
> 
> fm1 <- lmer(detections ~ localseason + constructionperiod2 +  (1|marten), 
>   data_std, family=poisson(log))
 
> How would I change this to account for the partial crossing that
> occurred between marten and periods?  Would it look like this?

  You mean the fact that some martens are not measured in some
periods?  I don't think that would necessarily be a problem.

> fm1 <- lmer(detections ~ localseason + constructionperiod2 + 
> (1|localseason:marten) +
> (1|constructionperiod2:marten) + (1|marten), data_std, family=poisson(log))

  What you are doing here is effectively allowing the number of
detections of each individual to vary according to season and
construction period.  It is in principle reasonable (you are right to
use interactions rather than nesting as in (1|localseason/marten),
because that would add a random effect of localseason to the existing
fixed effect of localseason, which would be a bad idea), but you must
generally have a response for each individuals more than once per
localseason and more than once per construction period (it's OK if
_some_ individuals have zero or one responses [by "response" I mean a
Poisson-distributed observation] in order for the model to be
sensible.

  Don't forget to check for overdispersion.



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