fredomom 发表于 2021-11-18 15:00 
你好 我也出现了ERROR:The specified variables can not form an identity,而且我用文件中的原始数据测了 ...
多谢提醒,我也试了试,也发现了这个问题,那说明原作者就是只设定了8部门才可以的吧?那这个就是原作者的一个问题了。
后来通过help ldmi,发现了一个默认的参数是用来控制这个问题的:
tolerance(real) specifies the tolerance; default is 0.01. The value is first used to check whether the specified variables can form an identity. Then it is used to check the difference between the real change and the total of the decomposed effects.
通过看了ldmi的源代码文件以及自己试了试,默认是tol(0.01),但是把它改大一些就可以,如下
lmdi E = I S Y, t(year) over(sector) tol(1)
具体可以看我又上传的一个文件。
我感觉是原作者貌似把部门标准控制的有些严格了。。。