rastila 发表于 2012-4-28 13:21 
我把整个程序复制在这里,这个在我不同的电脑上已经检验过了,是正常的
var x y;
varexo e u;
您提供的这个程序是正确的,把您的程序和我的比较了一下,通过逐步试验,错误原因在这里:
estimation(datafile=Simul_data,prefilter=1,mh_replic=200,
mode_compute=1,mh_nblocks=2, order=1) y x;
看了一下手册,
13. mode compute=INTEGER: species the optimizer for the mode computation.
0: the mode isn't computed. mode le must be specied
1: uses Matlab fmincon (see the Reference Manual to set options for this command).
2: uses Lester Ingber's Adaptive Simulated Annealing.
3: uses Matlab fminunc.
4 (default): uses Chris Sim's csminwel.
在不用aimsover时,mode compute=1或2都不行,但用3和4可以,这个函数应该是用来求似然函数最大值的吧?
而在用aimsolver时,model computer=1、2和3都不行,但4可以。
请问:从metroplis-hasting算法来看,是不是只要模型存在稳态就应该能估计出一个值来?