4
$\begingroup$

Considering a dataset where models do not converge to model random effects (e.g. boundary (singular) fit: see help('isSingular') in R), how confident can we be on the remaining coefficients?

To give an example, consider the following code and results (example taken from here):

library("afex")
# examples data set with both within- and between-subjects factors (see ?fhch2010)
data("fhch2010", package = "afex")
fhch <- fhch2010[ fhch2010$correct,] # remove errors
str(fhch2010) # structure of the data
#> 'data.frame':    13222 obs. of  10 variables:
#>  $ id       : Factor w/ 45 levels "N1","N12","N13",..: 1 1 1 1 1 1 1 1 1 1 ...
#>  $ task     : Factor w/ 2 levels "naming","lexdec": 1 1 1 1 1 1 1 1 1 1 ...
#>  $ stimulus : Factor w/ 2 levels "word","nonword": 1 1 1 2 2 1 2 2 1 2 ...
#>  $ density  : Factor w/ 2 levels "low","high": 2 1 1 2 1 2 1 1 1 1 ...
#>  $ frequency: Factor w/ 2 levels "low","high": 1 2 2 2 2 2 1 2 1 2 ...
#>  $ length   : Factor w/ 3 levels "4","5","6": 3 3 2 2 1 1 3 2 1 3 ...
#>  $ item     : Factor w/ 600 levels "abide","acts",..: 363 121 202 525 580 135 42 368 227 141 ...
#>  $ rt       : num  1.091 0.876 0.71 1.21 0.843 ...
#>  $ log_rt   : num  0.0871 -0.1324 -0.3425 0.1906 -0.1708 ...
#>  $ correct  : logi  TRUE TRUE TRUE TRUE TRUE TRUE ...

m2 <- mixed(log_rt ~ task * length + (length || id) + (task || item), 
            fhch, expand_re = TRUE)
#> Contrasts set to contr.sum for the following variables: task, length, id, item
#> boundary (singular) fit: see help('isSingular')

Note that the model does not converge, we can see that some of the random effects are not well modeled, and in fact have variances close to 0:

summary(m2)$varcor
#>  Groups   Name        Std.Dev.  
#>  item     re2.task1   1.0119e-01
#>  item.1   (Intercept) 1.0685e-01
#>  id       re1.length2 3.1129e-06 <<<<
#>  id.1     re1.length1 1.2292e-02
#>  id.2     (Intercept) 1.9340e-01
#>  Residual             3.0437e-01

My question is regarding how much we can be confident that the fixed effects have had coefficients accurately estimated.

$\endgroup$

1 Answer 1

3
$\begingroup$

From my understanding, a singular fit does not mean the model did not converge- actually, it could be the best representation of the data (see the links below). What would be a bigger issue is, if say, your random effects are near-perfectly correlated with each other.

If you want to see the effect your singular boundary is having on your fixed effect estimates, you could run the model a second time, removing some of the specified random effects until your model converges without the singular boundary warning (if it does). Then, call the summary and directly compare each of the estimates visually. From my personal experience, if your random effects structure is already quite minimal, I would not expect much change.

https://rpubs.com/palday/lme4-singular-convergence

https://www.sciencedirect.com/science/article/pii/S0749596X17300013

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.