title: test for significance of interaction in linear mixed models in nlme in R
body: <p>I use <code>lme</code> function in the <code>nlme</code> R package to test if levels of factor <code>items</code> has significant interaction with levels of factor <code>condition</code>. The factor <code>condition</code> has two levels: <code>Control</code> and <code>Treatment</code>, and the factor <code>items</code> has 3 levels: <code>E1,...,E3</code>. I use the following code:</p>
  
  <pre><code>f.lme = lme(response ~ 0 + factor(condition) * factor(items), random = ~1|subject)
  </code></pre>
  
  <p>where <code>subject</code> is the random effect. In this way, when I run:</p>
  
  <pre><code>summary(f.lme)$tTable
  </code></pre>
  
  <p>I will get the following output:</p>
  
  <pre><code>factor(condition)Control  
  factor(condition)Treatment  
  factor(items)E2
  factor(items)E3
  factor(condition)Treatment:factor(items)E2
  factor(condition)Treatment:factor(items)E3
  </code></pre>
  
  <p>together with <code>Value, Std.Error, DF, t-value, p-value</code> columns. I have two questions:</p>
  
  <ol>
  <li><p>If I want to compare <code>Control</code> vs. <code>Treatment</code>, shall I just use <code>estimable()</code> function in <code>gmodels</code> and make a contrast of <code>(-1,1,0,0,0,0)</code>?</p></li>
  <li><p>I am interested in whether levels of <code>items</code>, i.e. <code>E1, E2, E3</code> are different across <code>condition</code>, so I am interested in whether the interaction terms are significant (by just checking the <code>p-value</code> column??):</p>
  
  <p><code>factor(condition)Treatment:factor(items)E2
  factor(condition)Treatment:factor(items)E3</code></p></li>
  </ol>
  
  <p>However, how can I tell if <code>factor(condition)Treatment:factor(items)E1</code> is significant or not? It is not shown in the summary output and I think it has something to do with the contrast used in R... Thanks a lot!</p>