title: In R, how can I test interactions in a mixed model including only some levels of a factor?
body: <p>My R data frame looks something like this:</p>
  
  <pre><code>subject &lt;- factor(rep(c(1,2,3,4,5,6),each=12))
  dep &lt;- runif(12*6)
  f1 &lt;- factor(rep(c("Female","Male","Female","Male","Male","Female"), each=12))
  f2 &lt;- runif(12*6)
  f3 &lt;- factor(rep(c("day1","day2","day3","day4"),each=3, times=6))
  
  data &lt;- data.frame(sub=subject, dep=dep, f1=f1, f2=f2, f3=f3)
  
  m &lt;- lmer(dep ~ f1*f2*f3 + (1|sub), data=data)
  </code></pre>
  
  <p>This is random data so nothing is significant, but let's say there is a significant <code>f1*f2*f3</code> interaction. Now to understand where this interaction is coming from I'd like to perform simpler interactions involving only some levels of <code>f3</code>. For example, how can I test the significance of the <code>f1*f2*f3</code> interaction involving only <code>day1</code> and <code>day2</code>?</p>