0

I've been using the lmer function in lme4 and it gives me the coefficients for the independent variables so that I could build the predictive model, but it doesn't give me the F statistics for each factor. I tried to find how to get those (F stats) online and it said the anova function in nlme gives you F statistics... and this does give me them, but it only gives me the numerator degrees of freedom so I cant verify (and also doubt since its an ANOVA) that it is taking into account the random factor that I have in my mixed model, so they are probably not the correct F-statistics.

How can I get F-statistics for a model that accounts for random effects? I'm able to run the tukey pairwise using lsmeans to check specific comparisons, but I want to justify running those with the F-statistics first.

Tadhg McDonald-Jensen
  • 20,699
  • 5
  • 35
  • 59

1 Answers1

1

The car::Anova function is probably the better choice. Both it and anova do indeed compute anova tables, in the broad sense of testing contributions of factors to the model, but anova tests their sequential contributions rather than their marginal ones. Don’t worry much about the denominator df; they’ll be similar to the df for the same family of comparisons from lsmeans. You might consider switching to the emmeans package though, as lsmeans will not be developed further.

Russ Lenth
  • 5,922
  • 2
  • 13
  • 21