title: plot interaction terms in a mixed-model
body: <p>I would like to visualize the effect of a significant interaction term in the following mixed effects model. </p>
  
  <pre><code>c1 &lt;- lmer(log.weight ~ time + I(time^2) + temp + precip + time:precip + time:temp + (1|indiv), data = noctrl)
  </code></pre>
  
  <p>This model includes fixed effects of 'time' (simple and quadratic term), 'temperature', 'precipitation' and two interactions on the logarithmized response 'weight'. All terms are significant and the models assumptions of normality and homogeneity are met. </p>
  
  <p>I’ve been using the 'effects' package to produce interaction plots to show the effect of the interactions. When I try to show the interaction of time and temperature (time:temp) with the following code I’m not sure whether the resulting plot correctly shows this interaction.</p>
  
  <pre><code>ef2 &lt;- effect(term="time:temp", c1, multiline=TRUE)
  y &lt;- as.data.frame(ef2)
  ggplot(y , aes(time, fit, color=temp)) + geom_point() + geom_errorbar(aes(ymin=fit-se, ymax=fit+se), width=0.4) 
  </code></pre>
  
  <p>I need help understanding the <a href="https://i.stack.imgur.com/XAlDm.pngv" rel="nofollow noreferrer">resulting plot</a>  please. How come despite this interaction term is highly significant, the SEs overlap at each value of x? 
  Am I using the effects package correctly? Or is it because I need to include the quadratic term of time I(time^2) in the interaction terms as well?</p>
  
  <p>Thank you very much for the clarification.</p>