简体   繁体   English

使用EViews,运行稳健的最小二乘回归,我无法进行MM估计吗?

[英]Using EViews, running a Robust Least Square Regression, I can't do an MM-estimation?

I have developed a fairly simple multivariate regression econometrics model. 我已经开发了一个相当简单的多元回归计量经济学模型。 I am now attempting to run Robust Regressions (EViews calls them Robust Least Square). 我现在正在尝试运行稳健回归(EViews称其为稳健最小二乘)。 I can easily run a Robust Regression M-estimation. 我可以轻松地进行鲁棒回归M估计。 But, every time I run a Robust Regression MM-estimation I run into the same error: "Maximum number of singular subsamples reached." 但是,每次我进行稳健回归MM估计时,我都会遇到相同的错误:“达到最大奇异子样本数”。 I have played around with the MM-estimation specifications by increasing/decreasing number of iterations, convergence level, etc... Invariably, I run into the same error. 我通过增加/减少迭代次数,收敛水平等来处理MM估计规范。总是会遇到相同的错误。

At an EViews forum, another fellow ran into the exact same problem for both MM-estimation and S-estimation. 在EViews论坛上,另一个人遇到了MM估计和S估计完全相同的问题。 The forum moderator indicated that if a model has the presence of dummy variables without that many observations, such estimations may not reach convergence and generate the error as mentioned above. 论坛主持人指出,如果模型中存在虚拟变量而没有那么多观察,则这种估计可能无法达到收敛并产生上述误差。 My model does have dummy variables. 我的模型确实有虚拟变量。 And, some of them do not have that many observations (8 consecutive ones out of a time series data with 217 observations). 而且,其中一些观测值不那么多(在具有217个观测值的时间序列数据中,有8个连续观测值)。 However, I am unclear if this is a limitation of EViews or if this is truly an algorithm limitation. 但是,我不清楚这是否是EViews的限制,或者这是否确实是算法的限制。 I may attempt to rerun MM-estimation in R. And, see if it is feasible. 我可能会尝试在R中重新运行MM估计。然后,看是否可行。

Following up on the above, I did just that. 在上述内容之后,我做到了。 And, ran Robust Regression using R with MASS package using rlm() function. 并且,使用R和带有rlm()函数的MASS包运行了稳健回归。 Just as in EViews I had no problem running an M-estimation. 就像在EViews中一样,我运行M估计没有问题。 Similarly, I firt ran into trouble when attempting an MM-estimation. 同样,尝试进行MM估计时,我遇到了麻烦。 Just as in EViews I got an error message stating the regression/simulation did not reach convergence after 20 iterations. 就像在EViews中一样,我收到一条错误消息,指出20次迭代后回归/模拟未达到收敛。 So, I reran my MM-estimation by first eliminating all my dummy variables. 因此,我通过首先消除所有虚拟变量来重新进行MM估计。 As predicted, it worked. 如预期的那样,它起作用了。 Next, I added just one single dummy variable at a time and each time I reran my MM-estimation. 接下来,每次重新运行MM估计时,我一次只添加一个虚拟变量。 I did that to observe when the MM-estimation model would break down. 我这样做是为了观察MM估计模型何时会崩溃。 To my surprise, it never did. 令我惊讶的是,它从未如此。 And, now I eventually could run my MM-estimation with all the dummy variables. 而且,现在我终于可以对所有虚拟变量运行MM估计了。 I don't know why I could not run it at first with all the dummy variables in at once (maybe I did an error in coding). 我不知道为什么我不能一开始就用所有虚拟变量立即运行它(也许我在编码时出错了)。

This leads me to conclude that R is somewhat more flexible than EViews on this count. 这使我得出结论,在这一点上,R比EViews灵活一些。 After closer inspection, I noticed that the EViews M-estimation I ran was of the bisquare type (vs. the regular Huber one). 经过仔细检查,我注意到我运行的EViews M估计是双平方类型的(相对于常规的Huber估计)。 This makes a big difference. 这有很大的不同。 When I did run in R an M-estimation of the bisquare type I almost got the exact same results as EViews. 当我在R中运行双平方类型的M估计时,我几乎得到与EViews完全相同的结果。 There were small differences between the two. 两者之间的差异很小。 This can be expected given that the solving process is iterative. 考虑到求解过程是迭代的,因此可以预期。

As you can read in my commentary, I did quite a bit of work on the issue. 如您在我的评论中所读,我在这个问题上做了很多工作。 In the end, I am unclear why EViews methodically crashes when running a Robust Regression of the MM-estimation type with a model that has a few dummy variables. 最后,我不清楚为什么在使用带有一些虚拟变量的模型运行MM估计类型的稳健回归时,EViews为何会突然崩溃。 I feel like it should not. 我觉得不应该。 The exact same model using the same Robust Regression methodology was solvable in R with the MASS package and rlm function using method = "MM". 使用MASS软件包和rlm函数,使用方法=“ MM”,可以使用相同的稳健回归方法在R中求解完全相同的模型。

In case you find yourself in similar circumstances, I would advise you to attempt to do the Robust Regression MM type in R instead. 万一您遇到类似情况,我建议您尝试在R中执行“稳健回归MM”类型。 I don't know what is the relative resiliance of this process in SAS, SPSS, Python, STATA and other similar software. 我不知道此过程在SAS,SPSS,Python,STATA和其他类似软件中的相对弹性是多少。 Hopefully, any of those is more resiliant than EViews on this count. 希望在这一点上,任何一种都比EViews更具弹性。

It is not unlikely that this type of model can actually cause a software to crash (after numerous iterations, the algorithm is not converging towards a solution). 这种类型的模型实际上不会导致软件崩溃的可能性不大(经过无数次迭代之后,该算法并未收敛于解决方案)。 But, if my experience is any indicator R has a much higher resiliance threshold than EViews on this count. 但是,根据我的经验,就此而言,指标R的弹性阈值比EViews高得多。

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

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