# Kenward-Roger and REML

I am doing some mixed model analyses using the lmer function in R's lme4 package. I am using the lmerTest package to obtain p-values for fixed effects with the Kenward-Roger method of estimating denominator degrees of freedom. My understanding is that to test fixed effects in a mixed model, maximum likelihood should be used instead of REML. However, when using the Kenward-Roger method in lmerTest, REML is required. Why is this the case, and is this appropriate, given that REML is not typically recommended for testing fixed effects in mixed models?

• Welcome to the site @Peat. Why do you say that fixed effects can only be tested with maximum likelihood? That's a very strange claim. Please provide references; "I overheard at the watercooler" is not one. Also, please go back to edit your post and format the R packages and function names; see the help bar on the right for the specific ways to do that with reverse single quotes. – StasK Aug 26 '16 at 13:58
• @StasK: REML gives less biased estimates for the variance, it does so by ''eliminating'' (the coefficients of) the fixed effects from the likelihood function. Therefore the restricted likelihood of models with different fixed effects may not be compared. This can be found in Applied Longitudinal data analysis by Fitzmaurice, Laird and Ware (on page 103-104 of the second edition). See also stats.stackexchange.com/questions/99895/… – user83346 Aug 26 '16 at 17:09
• So? You can't do likelihood ratio tests, but you can still do Wald tests on fixed effects. – StasK Sep 1 '16 at 13:36
• @StasK, I think you should post an expanded version of your comment/explanation as an answer ... – Ben Bolker Sep 1 '16 at 16:23

• testing fixed effects by comparing models fitted with different fixed effects is nonsensical when using REML. In R, this would correspond to using anova()
• doing Wald tests of fixed effects (i.e., looking at the estimated curvature of the likelihood surface and computing standard errors of the parameters) is fine. In R, this would correspond to using summary().