pbkrtest
- at a glanceThe primary focus is on mixed effects models as implemented in the lme4
package. For those linear mixed models, the pbkrtest package implements
Kenward-Roger based F-tests
Parametric bootstrap based test
Satterthwaite based F-tests (! NEW !)
In addition, pbkrtest
also implments parametric bootstrap tests for generalized linear mixed models, for generalized linear models and for linear models.
If you publish work where pbkrtest, please do cite this paper (a latex entry is given below): Halekoh, U., and Højsgaard, S. (2014) A Kenward-Roger Approximation and Parametric Bootstrap Methods for Tests in Linear Mixed Models - the R Package pbkrtest. J. Stat. Soft. Vol. 59, Issue 9. pdf
nlme
and gls
models has been contributed. Is not in package yet.2020: Inferens i mixed models i R - hinsides det sædvanlige likelihood ratio test. 42. Symposium i Anvendt Statistik, 27.-28. January, Aarhus, Denmark pdf
2018: Inference in mixed models in R - beyond the usual asymptotic likelihood ratio test. Nordstat conference, Tartu, Estonia, June 2018. pdf
Please see my talks page.
Calculation of the the adjusted degrees of freedom for the Kenward-Roger approximation can be computationally demanding because it requires inversion of an N ×N matrix where N is the number of observations. Possible remedies for this:
Parametric bootstrap is an alternative, and while also computationally intensive, parametric bootstrap can be parallelized (facilities exist in pbkrtest
). href=“http://cran.r-project.org/web/packages/pbkrtest/index.html”>pbkrtest).
Use Satterthwaites approximation instead. This method scales better higher dimensional problems.
Development versions of the package reside on github. To use the development version, PLEASE first install the package from CRAN to get dependencies right and then AFTERWARDS install the development version using:
devtools::install_github("hojsgaard/pbkrtest")
Q: Do these methods work for generalized linear mixed models ?
A: Parametric bootstrap is available for generalized linear mixed models. We are not aware of any developments for approximate F-tests in the spirit of Kenward-Roger / Satterthwaite for generalized linear models.
Q: Are these models implemented for mixed models fitted with the nlme package?
A: Yes and no. Code exists but needs to be integrated with the package.
When reporting unexpected behaviours, bugs etc. PLEASE supply:
A small reproducible example in terms of a short code fragment.
The data. The preferred way of sending the data “mydata” is to copy and paste the result from running dput(mydata).
The result of running the sessionInfo() function.
citation("pbkrtest")
To cite pbkrtest in publications use:
Ulrich Halekoh, Søren Højsgaard (2014). A Kenward-Roger Approximation
and Parametric Bootstrap Methods for Tests in Linear Mixed Models -
The R Package pbkrtest. Journal of Statistical Software, 59(9), 1-30.
URL https://www.jstatsoft.org/v59/i09/.
A BibTeX entry for LaTeX users is
@Article{,
title = {A Kenward-Roger Approximation and Parametric Bootstrap Methods for Tests in Linear Mixed Models -- The {R} Package {pbkrtest}},
author = {Ulrich Halekoh and S{\o}ren H{\o}jsgaard},
journal = {Journal of Statistical Software},
year = {2014},
volume = {59},
number = {9},
pages = {1--30},
url = {https://www.jstatsoft.org/v59/i09/},
}