简体   繁体   English

混合模型lme4中的警告消息

[英]Warning message in mixed model lme4

What is the meaning of the following warning message when fitting a 'glmer' model using package lme4? 使用包lme4安装'glmer'模型时,以下警告消息的含义是什么?

Warning messages:
1: glm.fit: fitted probabilities numerically 0 or 1 occurred 
2: In mer_finalize(ans) : false convergence (8)

The model I'm trying to fit is like this: 我试图适合的模型是这样的:

glmer(dummy ~ constituency.coa + I(governat.part) + I(district2) + gdp.cap + lula.power + ifdm + bf.cap + year + (1 | munname), data=pool, family=binomial(link = "logit"), REML=T, verbose=T)

Thanks 谢谢

For Warning 2, you can up the number of iterations, the default is 300, to see if it converges when you add more iterations. 对于警告2,您可以增加迭代次数,默认值为300,以查看在添加更多迭代时它是否收敛。 try: 尝试:

glmer(dummy ~ constituency.coa + I(governat.part) + I(district2) + gdp.cap + lula.power + ifdm + bf.cap + year + (1 | munname), data=pool, family=binomial(link = "logit"), REML=T, verbose=T, control = list(maxIter = 600))

this changes it from 300 iterations to 600, but you could try more if that doesn't work. 这会将它从300次迭代更改为600次,但如果不起作用,您可以尝试更多。

Warning 1: the fitted values became 0 or 1 for one or more observations, but this should not be possible under a logistic regression. 警告1:对于一个或多个观察,拟合值变为0或1,但在逻辑回归下这不可能。 The causes are many; 原因很多; one is discussed on the help page for ?glm but that is little more than a pointer to some other documentation. 一个在?glm的帮助页面上讨论,但这只是指向其他文档的指针。 It is only a warning so may not be a problem, but it is a warning that something is not quite right with the fit. 这只是一个警告,所以可能不是一个问题,但它是一个警告,有些东西不合适。

Warning 2: I don't know the exact meaning, but the code is telling you that the optimisation routine declared the fitting procedure to have converged to the estimated values but that this claim is false and that the fitting did not really converge. 警告2:我不知道确切含义,但是代码告诉你,优化例程声明拟合过程已经收敛到估计值但是这个声明是假的并且拟合没有真正收敛。

One thing to look at is whether there is a separability problem, where one predictor or a linear combination of predictors can perfectly split 0 and 1 events. 要注意的一件事是,是否存在可分性问题,其中一个预测变量或预测变量的线性组合可以完美地分割01事件。

I suggest you follow this up on the R-SIG-Mixed mailing list where there are real experts who can help further. 我建议你在R-SIG-Mixed邮件列表上进行跟进,那里有真正的专家可以提供进一步的帮助。 You may need to provide further details of the fitting process (turn on verbose mode) or even the data so the problem can be diagnosed. 您可能需要提供拟合过程的详细信息(打开详细模式)或甚至数据,以便可以诊断问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM