You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' If a model is "singular", this means that some dimensions of the variance-covariance
29
+
#' matrix have been estimated as exactly zero. \code{is_singular()} checks if
30
+
#' a model fit is singular, and can be used in case of post-fitting convergence
31
+
#' warnings, such as warnings about negative eigenvalues of the Hessian. If the fit
32
+
#' is singular (i.e. \code{is_singular()} returns \code{TRUE}), these warnings
33
+
#' can most likely be ignored.
34
+
#' \cr \cr
35
+
#' There is no gold-standard about how to deal with singularity and which
36
+
#' random-effects specification to choose. Beside using fully Bayesian methods
37
+
#' (with informative priors), proposals in a frequentist framework are:
38
+
#' \itemize{
39
+
#' \item avoid fitting overly complex models, such that the variance-covariance matrices can be estimated precisely enough (\cite{Matuschek et al. 2017})
40
+
#' \item use some form of model selection to choose a model that balances predictive accuracy and overfitting/type I error (\cite{Bates et al. 2015}, \cite{Matuschek et al. 2017})
41
+
#' \item \dQuote{keep it maximal}, i.e. fit the most complex model consistent with the experimental design, removing only terms required to allow a non-singular fit (\cite{Barr et al. 2013})
42
+
#' }
43
+
#'
44
+
#' @references \itemize{
45
+
#' \item Bates D, Kliegl R, Vasishth S, Baayen H. Parsimonious Mixed Models. arXiv:1506.04967, June 2015.
46
+
#' \item Barr DJ, Levy R, Scheepers C, Tily HJ. Random effects structure for confirmatory hypothesis testing: Keep it maximal. Journal of Memory and Language, 68(3):255–278, April 2013.
47
+
#' \item Matuschek H, Kliegl R, Vasishth S, Baayen H, Bates D. Balancing type I error and power in linear mixed models. Journal of Memory and Language, 94:305–315, 2017.
#' @param x Fitted mixed effects model (of class \code{merMod}, \code{glmmTMB},
762
-
#' \code{stanreg} or \code{brmsfit}). \code{get_re_var()} also accepts
763
-
#' an object of class \code{icc.lme4}, as returned by the
764
-
#' \code{\link{icc}} function.
760
+
#' \code{stanreg} or \code{brmsfit}). \code{get_re_var()} also accepts
761
+
#' an object of class \code{icc.lme4}, as returned by the
762
+
#' \code{\link{icc}} function.
765
763
#' @param comp Name of the variance component to be returned. See 'Details'.
764
+
#' @param adjusted Logical, if \code{TRUE}, returns the variance of the fixed
765
+
#' and random effects as well as of the additive dispersion and
766
+
#' distribution-specific variance, which are used to calculate the
767
+
#' adjusted and conditional \code{\link{r2}} and \code{\link{icc}}.
766
768
#'
767
769
#' @return \code{get_re_var()} returns the value of the requested variance component,
768
770
#' \code{re_var()} returns all random effects variances.
769
771
#'
770
-
#' @references Aguinis H, Gottfredson RK, Culpepper SA. 2013. Best-Practice Recommendations for Estimating Cross-Level Interaction Effects Using Multilevel Modeling. Journal of Management 39(6): 1490–1528 (\doi{10.1177/0149206313478188})
772
+
#' @references \itemize{
773
+
#' \item Aguinis H, Gottfredson RK, Culpepper SA. 2013. Best-Practice Recommendations for Estimating Cross-Level Interaction Effects Using Multilevel Modeling. Journal of Management 39(6): 1490–1528 (\doi{10.1177/0149206313478188})
774
+
#' \item Johnson PC, O'Hara RB. 2014. Extension of Nakagawa & Schielzeth's R2GLMM to random slopes models. Methods Ecol Evol, 5: 944-946. (\doi{10.1111/2041-210X.12225})
775
+
#' \item Nakagawa S, Johnson P, Schielzeth H (2017) The coefficient of determination R2 and intra-class correlation coefficient from generalized linear mixed-effects models revisted and expanded. J. R. Soc. Interface 14. \doi{10.1098/rsif.2017.0213}
776
+
#' }
771
777
#'
772
778
#' @details The random effect variances indicate the between- and within-group
773
779
#' variances as well as random-slope variance and random-slope-intercept
0 commit comments