为什么即使随机效应方差未估计为零,也未将相关性估计为+/- 1,我仍会收到关于奇异拟合的警告?

时间:2019-08-21 07:28:00

标签: r glm lme4 mixed-models

我使用程序包afex运行具有二项式链接函数的广义线性混合模型(GLMM),以使用以下代码分析任务的准确性:

model1.ds = mixed(corr ~ groupID*cond*degrees*axis + gender + 
centerage + gender:groupID + centerage:groupID 
+ (cond*degrees*axis|subjectID) + (1|target.id),
data = ds.data, method = 'LRT',control = 
glmerControl(optCtrl=list(maxfun=2e8)),
family = binomial(link = 'logit'), all_fit=TRUE, cl = cl)

数据结构如下:

$ subjectID : Factor w/ 40 levels "101","102","103",..:
$ groupID   : Factor w/ 2 levels "DS","HN": 
$ corr      : num  1 1 1 1 1 1 1 1 1 1 ...
$ target.id : Factor w/ 15 levels "1","10","11",..:
$ degrees   : Factor w/ 4 levels "0","60","120",..:
$ axis      : Factor w/ 2 levels "horizontal","vertical": 
$ cond      : Factor w/ 2 levels "same","mirrored":
$ gender    : Factor w/ 2 levels "male","female":
$ centerage : atomic  8.61 8.61 8.61 8.61 8.61 ...

运行此模型时,收到以下警告:

  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'cond':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'degrees':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'gender':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'centerage':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:cond':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:degrees':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'cond:degrees':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'cond:axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'degrees:axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:gender':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:centerage':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:cond:degrees':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:cond:axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:degrees:axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'cond:degrees:axis':
  * boundary (singular) fit: see ?isSingularlme4 reported (at least) the following warnings for 'groupID:cond:degrees:axis':
  * boundary (singular) fit: see ?isSingular

如果我理解正确,那么当随机效应方差估计为零或相关性估计为+/- 1时,通常会发生此类警告。但是,事实并非如此:

Model:     gender:groupID + centerage:groupID + (cond * degrees * axis | 
Model:     subjectID) + (1 | target.id)
Data: ds.data
Df full model: 173
                      Effect df     Chisq p.value
1                    groupID  1      0.53     .47
2                       cond  1 14.26 ***   .0002
3                    degrees  3 63.69 ***  <.0001
4                       axis  1      0.09     .77
5                     gender  1      0.00     .95
6                  centerage  1    5.34 *     .02
7               groupID:cond  1      0.06     .81
8            groupID:degrees  3    7.92 *     .05
9               cond:degrees  3 39.19 ***  <.0001
10              groupID:axis  1      0.18     .67
11                 cond:axis  1      0.27     .60
12              degrees:axis  3 17.56 ***   .0005
13            groupID:gender  1      1.07     .30
14         groupID:centerage  1      1.36     .24
15      groupID:cond:degrees  3    7.26 +     .06
16         groupID:cond:axis  1      0.58     .45
17      groupID:degrees:axis  3      0.70     .87
18         cond:degrees:axis  3      4.34     .23
19 groupID:cond:degrees:axis  3      2.27     .52
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: corr ~ groupID * cond * degrees * axis + gender + centerage +  
    gender:groupID + centerage:groupID + (cond * degrees * axis |      subjectID) + (1 | target.id)
   Data: dots$data
Control: ctrl

     AIC      BIC   logLik deviance df.resid 
  5551.3   6791.7  -2602.7   5205.3     9427 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-10.0742   0.0984   0.2056   0.3345   2.9059 

Random effects:
 Groups    Name                 Variance Std.Dev. Corr                                                             
 subjectID (Intercept)          0.47951  0.6925                                                                    
           cond1                0.18497  0.4301    0.09                                                            
           degrees1             0.37840  0.6151    0.04 -0.41                                                      
           degrees2             0.07897  0.2810    0.14  0.74  0.09                                                
           degrees3             0.08058  0.2839   -0.03 -0.15 -0.71 -0.61                                          
           axis1                0.09348  0.3057   -0.13 -0.05  0.06 -0.12  0.33                                    
           cond1:degrees1       0.43913  0.6627   -0.03 -0.19  0.24 -0.16  0.11  0.63                              
           cond1:degrees2       0.03610  0.1900    0.51  0.05 -0.37  0.01  0.32  0.31  0.01                        
           cond1:degrees3       0.21020  0.4585   -0.23 -0.14 -0.08 -0.10 -0.02 -0.65 -0.83 -0.34                  
           cond1:axis1          0.06011  0.2452    0.24 -0.28 -0.16 -0.56  0.62  0.48  0.25  0.47 -0.15            
           degrees1:axis1       0.39570  0.6290   -0.34 -0.59  0.40 -0.61  0.07  0.45  0.65 -0.11 -0.38  0.42      
           degrees2:axis1       0.15866  0.3983    0.46  0.06 -0.30 -0.05  0.19 -0.54 -0.82  0.20  0.69  0.13 -0.65
           degrees3:axis1       0.09526  0.3086   -0.11  0.75 -0.16  0.93 -0.44 -0.18 -0.27 -0.03  0.05 -0.65 -0.68
           cond1:degrees1:axis1 0.47493  0.6892   -0.27 -0.67  0.35 -0.74  0.23  0.45  0.65 -0.14 -0.33  0.53  0.97
           cond1:degrees2:axis1 0.18847  0.4341    0.13  0.50 -0.49  0.49 -0.03 -0.23 -0.67  0.37  0.25 -0.42 -0.80
           cond1:degrees3:axis1 0.13904  0.3729    0.52  0.72  0.13  0.76 -0.50 -0.05  0.07  0.04 -0.43 -0.37 -0.44
 target.id (Intercept)          0.20089  0.4482                                                                    













 -0.03                  
 -0.54 -0.80            
  0.47  0.63 -0.86      
 -0.05  0.56 -0.52  0.26

我尝试简化模型,但是即使是最简单的模型,每个主题“(1 | subjectID)”仅具有随机截距,也会引起关于奇点的警告。有关如何进行的任何建议?

0 个答案:

没有答案