简体   繁体   English

警告使用混合模型计算置信区间

[英]Warnings calculating confidence intervals with mixed models

I'm fairly new to R, but have been running models using lmer. 我对R很陌生,但是一直在使用lmer运行模型。 Now I'm trying to calculate the confidence intervals for the intercept and the condition. 现在,我正在尝试计算截距和条件的置信区间。

For example: 例如:

Model1 <- lmer(Response ~ Treatment + 
               (1+Treatment|Hospital), data=Data) 
confint(Model1)

I receive the following output and warnings such as: 我收到以下输出和警告,例如:

              2.5 %     97.5 %
.sig01         5.6742125  6.7891223
.sig02        -0.9234187 -0.5258181
.sig03         2.7687916  8.7684621
.sigma         1.8734195  2.3471127
(Intercept)   26.7283448 28.9332127
TreatmentDrugx 12.1278192 20.4275981

Warning messages: 1: In optwrap(optimizer, par = start, fn = function(x) dd(mkpar(npar1, : convergence code 1 from bobyqa: bobyqa -- maximum number of function > evaluations exceeded 警告消息:1:在optwrap(优化器中,par =开始,fn =函数(x)dd(mkpar(npar1,::bobyqa的会聚代码1):bobyqa-函数的最大数量>超过评估

2: In optwrap(optimizer, par = start, fn = function(x) dd(mkpar(npar1, : convergence code 1 from bobyqa: bobyqa -- maximum number of function evaluations exceeded 2:在optwrap(optimizer,par = start,fn = function(x)dd(mkpar(npar1,::bobyqa的会聚代码1):bobyqa-超出函数评估的最大数量

When I try: 当我尝试:

confint(Model1, parm="beta_")

I do not get the warnings but only get the confidence intervals for the intercept and for the level of treatment. 我没有得到警告,只是得到了截距和治疗水平的置信区间。

Are these intercepts okay, or should the previous warnings make me wary to accept those as CIs? 这些拦截是否可以,还是以前的警告应该让我警惕地接受为CI?

Sorry if this is a dumb question, again, do not have to much in depth statistical knowledge or coding experience. 很抱歉,如果这是一个愚蠢的问题,同样,您也无需太多的统计知识或编码经验。

it probably won't make a huge difference, but you should try adding 它可能不会有很大的不同,但是您应该尝试添加

control=lmerControl(optCtrl=list(maxfun=10000))

to your function arguments. 您的函数参数。

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

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