Main Article Content
The issue of variance components testing arises naturally when building mixed-effects models, to decide which effects should be modeled as fixed or random or to build parsimonious models. While tests for fixed effects are available in R for models fitted with lme4, tools are missing when it comes to random effects. The varTestnlme package for R aims at filling this gap. It allows to test whether a subset of the variances and covariances corresponding to a subset of the random effects, are equal to zero using asymptotic property of the likelihood ratio test statistic. It also offers the possibility to test simultaneously for fixed effects and variance components. It can be used for linear, generalized linear or nonlinear mixed-effects models fitted via lme4, nlme or saemix. Numerical methods used to implement the test procedure are detailed and examples based on different real datasets using different mixed models are provided. Theoretical properties of the used likelihood ratio test are recalled.