问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

meologit不收敛怎么办

发布网友 发布时间:2022-05-27 15:35

我来回答

1个回答

热心网友 时间:2023-10-31 06:34

解决logit 不收敛通过以下。

1. logit 对应逻辑分布,probit对应标准正态分布的假设,在估计的时候使用的都是MLE最大似然估计

2. 最大似然估计有一个特点,就是在不断迭代iteration中,寻找到最大化
似然函数的那个估计值

3. 因此,问题常常处在iteration的过程中,一般有两种:第一是出现(not concave),第二是出现(back up)。需要注意的是,只要这两个不出现在最后一行iteration的后面,就都不是事儿,不用管。但是如果出现在最后一行,或者一直在iteration不汇报结果,那么就有问题了。比如下面这样:

Iteration 4441: log pseudolikelihood = -51554.273  (backed up)
Iteration 4442: log pseudolikelihood = -51554.273  (backed up)
Iteration 4443: log pseudolikelihood = -51554.273  (backed up)



4. 根据stata的官方文件,not concave的问题在于:可能是存在
自变量的共线性问题;或者数据结构中,最优的点的位置不是concave的,是一个“平台”。

If a “not concave” message appears at the last step, there are two possibilities. One is that the result is valid, but there is collinearity in the model that the command did not otherwise catch. Stata checks for obvious collinearity among the independent variables before performing the maximization, but strange collinearities or near collinearities can sometimes arise between coefficients and ancillary parameters. The second, more likely cause for a “not concave” message at the final step is that the optimizer entered a flat region of the likelihood and prematurely declared convergence




5. 根据stata的官方文件,back up的问题在于:可能是找到了一个完美的point,已经找不到更好的继续iteration的点的(大概率不可能);另外有可能是根据优化路径,路径太坏,不知道下一步向哪里优化。【论坛上面有人认为原因是:数据质量差,或者存在共线性问题,或者存在异常值的问题干扰估计】


If a “backed up” message appears at the last step, there are also two possibilities. One is that Stata found a perfect maximum and could not step to a better point; if this is the case, all is fine, but this is a highly unlikely occurrence. The second is that the optimizer worked itself into a bad concave spot where the computed gradient and Hessian gave a bad direction for stepping.




6. 解决方法:使用gradient 或者difficult 的option;或者我觉得也可以更换technique的option,就是更换做迭代iteration的方法,常用的有nr,bhhh,dfp,bfgs,其中nr是默认选项。


【difficult】 specifies that the likelihood function is likely to be difficult to maximize because of nonconcave regions. When the message “not concave” appears repeatedly, ml’s standard stepping algorithm may not be working well. difficult specifies that a different stepping algorithm be used in nonconcave regions. There is no guarantee that difficult will work better than the default; sometimes it is better and sometimes it is worse. You should use the difficult option only when the default stepper declares convergence and the last iteration is “not concave” or when the default stepper is repeatedly issuing “not concave” messages and procing only tiny improvements in the log likelihood.


【gradient】 adds to the iteration log a display of the current gradient vector.


【technique(algorithm spec)】 specifies how the likelihood function is to be maximized. The following algorithms are allowed. For details, see Gould, Pitblado, and Poi (2010). technique(nr) specifies Stata’s modified Newton–Raphson (NR) algorithm. technique(bhhh) specifies the Berndt–Hall–Hall–Hausman (BHHH) algorithm. technique(dfp) specifies the Davidon–Fletcher–Powell (DFP) algorithm. technique(bfgs) specifies the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.




加入gradient之后,如果gradient变成0的时候,最终的结果就是可以接受的优化结果,但如果不是0,那么得到的就不是valid的结果,需要对于收敛进行严格定义,比如使用 ltol(0) tol(1e-7) 等。
If the gradient goes to zero, the optimizer has found a maximum that may not be unique but is a maximum. From the standpoint of maximum likelihood estimation, this is a valid result. If the gradient is not zero, it is not a valid result, and you should try tightening up the convergence criterion, or try ltol(0) tol(1e-7) to see if the optimizer can work its way out of the bad region.




使用difficult的option的时候,也要注意,可能会得到更坏的结果。
If you get repeated “not concave” steps with little progress being made at each step, try specifying the difficult option. Sometimes difficult works wonderfully, recing the number of iterations and procing convergence at a good (that is, concave) point. Other times, difficult works poorly, taking much longer to converge than the default stepper.







7. 最后提醒大家,logit和probit是可以通过iterate(#) 这个option来*最大迭代次数的,但是一般都不建议使用,因为这样很有可能得到的是无效的结果。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
平安银行卡不用了怎么办,又没有注销,会不会扣你身份证的信誉啊 ...装备强化进阶攻略[图]-手游攻略-游戏鸟手游网 酱猪肉总散发刺激味道,该如何去除呢? 城市广州别称羊城城市特点简介 20120310快乐大本营主持人推荐的手机软件分别叫什么? 考全科医疗副主任医师什么考试书好 大家帮我参考一下这个”广博DT1138C”数码相机能不能买啊? ...怎么调光圈和像素照出来颜色漂亮,我照的怎么颜色乌突突的啊?_百度... 大家帮我参考一下这个”广博DT1138C”数码相机能不能买啊? 沪昆高铁经过娄底哪些地方 likelihood function请问是什么意思 ML译码是什么 构建进化树前怎么分析序列?掐头去尾 请英语高手帮忙翻译摘要 计算机专业英语 求翻译 XL4012 是怎么实现PWM信号调光的? 跪求翻译成此段为英文!!! 求基于单片机PWM调光的硬件电路。 请问,如果利用最大似然法求模型参数(在MATLAB中) 最大似然估计值和最大似然估计量的英文都是maximum likelihood estimator。 什么是条件最大似然方法(conditional maximum likelihood) 最大似然树 maximum likelihood 怎么做 谁有PWM调光电路图,最简单的就行 qmdownload 什么意思? 小时候,你读过的第一本书是什么? 快手极速版里面提取现金的那个电话号码弄不见了那现金该怎么提取? 快手极速版开始可以提现,但是明天提现的时候发现我的手机号码变了,这是怎么回事啊? 希金斯禁赛后的第一场比赛是什么时间?准确时间!谢谢! 奥沙利文 希金斯 到底哪个是斯诺克第一啊? 约翰·希金斯的年度最佳 梦见滑倒在厕所能了一身脏东西 如何清理帆布包上的热能胶? 如何重新申请? 怎么重新注册 怎样再注册另一个 如何重新注册 怎样重新注册 怎样查劳动局发的塔吊操作证 我把身证发给了劳动局帮我杳失业就业能给查吗 河源市劳动局颁发职业资格证书如何查询 智能电表有啥办法从电袁上断电? 药师心经什么作用药师佛心经全文注拼音/药师心经什么 电池校正,acer4535g,win7操作系统,如何进行电池校正,在电源选项里设置的时候找不到电池报警的参数。 acer4750G笔记本,突然发现电池不能充电,右下角任务栏提示(电源已接通,正在充电,0%s可用),怎么解决. acer 笔记本电池问题·· acer笔记本电池电量问题 物理死杆与活杆问题! 需要详细说明解释,最好有举例! 玉米种是活杆诚熟好还是死杆成熟好? 急求!!!,高一力的合成与分解的‘活杆”和“死杆”问题各一道、必为计算题,拜托、、在线等、、 高中物理。有赏!为什么活杆上的弹力一定沿着杆的方向,死杆上的力不一定沿杆的方向?