全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
6464 3
2014-02-25
悬赏 5 个论坛币 已解决
R中运行下列语句一直提示错误 求高手解惑

m0<-lme(height~age+I(age^2)+I(age^3),Loblolly,random=list(Seed=~age+I(age^2)+I(age^3)))
Error in lme.formula(height ~ age + I(age^2) + I(age^3), Loblolly, random = list(Seed = ~age +  :
  nlminb problem, convergence error code = 1
  message = iteration limit reached without convergence (10)

最佳答案

vincentwbb 查看完整内容

#国外某论坛上的解决方案,达到循环限制仍未收敛,用lmeControl修改最大循环限制(具体见?lmeControl),代码如下: #Try ?lmeControl #Setting the maxIter, msMaxIter, niterEM, and/or msMaxEval arguments to higher values than the default #may fix this. #Capture the output from lmeControl to an object and then pass that object to the control #argument of lme. ctl
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-2-25 11:44:24
#国外某论坛上的解决方案,达到循环限制仍未收敛,用lmeControl修改最大循环限制(具体见?lmeControl),代码如下:
#Try ?lmeControl
#Setting the maxIter, msMaxIter, niterEM, and/or msMaxEval arguments to higher values than the default #may fix this. #Capture the output from lmeControl to an object and then pass that object to the control #argument of lme.
ctl <- lmeControl (msMaxIter=100)
m0 <- lme(height~age + I(age^2) + I(age^3),Loblolly,
          random=list(Seed=~age+I(age^2)+I(age^3)),
          correlation=corCAR1(form=~age|Seed), control=ctl)
m0
plot (m0)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-3-26 01:05:02
nlminb problem, convergence error code = 1
  message = iteration limit reached without convergence (9)
楼主,我也遇到同样问题,你的解决了吗
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2022-9-3 20:48:54
如果模型无法收敛,可改变control设置。
收敛问题可以通过更改模型迭代限制(maxIter)或更改模型优化器(opt)来解决。例如`control = list (maxIter = 100, opt = "optim")`将把最大迭代次数改为100,优化器改为optim
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群