lme4 (version 1.0-6)

pvalues: Getting p-values for fitted models

Description

One of the most frequently asked questions about lme4 is "how do I calculate p-values for estimated parameters?" Previous versions of lme4 provided the mcmcsamp function, which efficiently generated a Markov chain Monte Carlo sample from the posterior distribution of the parameters, assuming flat (scaled likelihood) priors. Due to difficulty in constructing a version of mcmcsamp that was reliable even in cases where the estimated random effect variances were near zero (e.g. https://stat.ethz.ch/pipermail/r-sig-mixed-models/2009q4/003115.html), mcmcsamp has been withdrawn (or more precisely, not updated to work with lme4 versions >=1.0.0).

Many users, including users of the aovlmer.fnc function from the languageR package which relies on mcmcsamp, will be deeply disappointed by this lacuna. Users who need p-values have a variety of options:

  • likelihood ratio tests viaanova(MC,+)
  • profile confidence intervals viaprofile.merModandconfint.merMod(CI,+)
  • parametric bootstrap confidence intervals and model comparisons viabootMer(orPBmodcompin thepbkrtestpackage) (MC/CI,*,+)
  • for random effects, simulation tests via theRLRsimpackage (MC,*)
  • for fixed effects, F tests via Kenward-Roger approximation usingKRmodcompfrom thepbkrtestpackage (MC)
  • car::AnovaandlmerTest::anovaprovide wrappers forpbkrtest: the latter also provides t tests via the Satterthwaite approximation (P,*)
In the list above, the methods marked MC provide explicit model comparisons; CI denotes confidence intervals; and P denotes parameter-level or sequential tests of all effects in a model. The starred (*) suggestions provide finite-size corrections (important when the number of groups is <50); those="" marked="" (+)="" support="" glmms="" as="" well="" lmms.<="" p="">

When all else fails, don't forget to keep p-values in perspective: http://www.phdcomics.com/comics/archive.php?comicid=905

Arguments