还需要改个地方,你把ipm=3,改成ipm=1。
ipm是估计概率转移矩阵的参数,=3是用作者自己编写的那一套代码去估计,后面程序里有说明;
=1是直接估计2*2矩阵中的p11和p22
另外,我用的是gauss7.0,改了之后运行无误
         FINAL ESTIMATES
Value of log likelihood:      -2845.4269 
Coefficients:
      0.33000284       0.26802494        23.460591       0.11939691       0.25590515    0.00015927405        10.503320       0.10594459       0.44324573        3.3957401        3.7547000 
Constant term in regression      0.33000284 
Autoregressive coefficients in regression      0.26802494 
Initial variance not neeeded 
Constant term in ARCH process       23.460591 
Coefficients on lagged epsilon squared in ARCH process      0.11939691       0.25590515 
(Transposed) matrix of transition probabilities
  2.5368221e-008     0.0089831327 
      0.99999997       0.99101687 
The state with no adjustment to ARCH process is state 1, with transition
probability   2.5368221e-008 
Vector of variance factors for states 2 through       2.0000000       0.10594459 
Coefficient on negative lagged change for asymmetric effect      0.44324573 
degree of freedom for t distribution is       5.3957401 
Gradient vector:
  6.9179806e-005     0.0011302750  -7.8088182e-005    -0.0020425821    -0.0018203135    0.00015770401  -7.8054892e-005     -0.014099421   -0.00073166419   -0.00026004046       0.00000000 
Hessian not positive definite; eigenvalues are
      0.00000000    0.00017917889      0.024908049        1.1920800        70.196701        256.68116        352.48718        424.74669        1439.5269        1983.4422        17026.812 
eigenvector associated with smallest eigenvalue is
      0.00000000       0.00000000       0.00000000       0.00000000       0.00000000       0.00000000       0.00000000       0.00000000       0.00000000       0.00000000       0.00000000        1.0000000 
Matrix of Markov transition probabilities:
  2.5368221e-008     0.0089831327 
      0.99999997       0.99101687 
Ergodic probs for full state vector:
      0.00000000   2.2585755e-010   7.9978217e-005     0.0088231762   2.2585744e-010     0.0089031542     0.0088231762       0.97337051 
Ergodic probs for primitive states:
    0.0089031547       0.99109685 
Log likelihood:
      -2845.4269