Incorporating time series into a mixed effects model in R (using lme4)
<p>I've had a search for similar questions and come up short so apologies if there are related questions that I've missed.</p>

<p>I'm looking at the amount of time spent on feeders (dependent variable) across various conditions with each subject visiting feeders 30 times.</p>

<p>Subjects are exposed to feeders of one type which will have a different combination of being scented/unscented, having visual patterns/being blank, and having these visual or scented patterns presented in one of two spatial arrangements.</p>

<p>So far my model is:</p>

<pre><code>mod&lt;-lmer(timeonfeeder ~ scent_yes_no + visual_yes_no + 
    pattern_one_or_two + (1|subject), data=data)
</code></pre>

<p>How can I incorporate the visit numbers into the model to see if these factors have an effect on the time spent on the feeders over time?</p>