title: post-hoc test for one-way ANOVA with random effect
body: <p>I have a continuous response variable <code>yld</code> and a categorical predictor <code>check</code> (with 3 levels). I did an one-way ANOVA and a post-hoc test to see which levels differ from each other. </p>
  
  <pre><code>mdl&lt;-aov(sqrt(var$yld) ~ var$check); summary(mdl);TukeyHSD(mdl) 
  
                 Df Sum Sq Mean Sq F value   Pr(&gt;F)    
  var$check      2   5162  2581.2   13.51 1.46e-06 ***
  Residuals   2775 530395   191.1                     
  
  Tukey multiple comparisons of means
  95% family-wise confidence level
  
  Fit: aov(formula = sqrt(var$yld) ~ var$check)
  
  $`var$check`
  
           diff       lwr       upr     p adj
   NC-LC -3.0123196 -4.529649 -1.494991 0.0000101
   RC-LC -2.8330205 -4.348031 -1.318010 0.0000358
   RC-NC  0.1792991 -1.310563  1.669161 0.9570495
  </code></pre>
  
  <p>Now, this data is collected over multiple site, so I want to use <code>site.code</code> as my random effect.  </p>
  
  <pre><code>library(lme4)
  mdl1&lt;-lmer(sqrt(yld) ~ check + (1 | site.code),data=var)
  summary(mdl1)
  </code></pre>
  
  <p>This gives me different outputs but the most important one is:</p>
  
  <pre><code>Fixed effects:
          Estimate Std. Error t value
  (Intercept)  50.7267     1.3028   38.94
  checkNC      -2.7075     0.5449   -4.97
  checkRC      -2.5048     0.5441   -4.60
  </code></pre>
  
  <p>It takes <code>LC</code> level as the <code>intercept</code> and checks how <code>NC</code> and <code>RC</code> are different from the <code>intercept</code>. I have two questions:</p>
  
  <p>1) Why is there no <code>p-value</code> displayed here in the output of <code>mdl1</code>
  2) This output compares <code>NC</code> and <code>RC</code> with the intercept. Is there any post-hoc to do pair-wise comparison of all levels?</p>
  
  <p>Thanks </p>