在用hamilton的代码做swarch模型的估计的时候,他是怎么得到转移概率矩阵的?
我看到代码里面写的是给定了4个数据,然后由这4个数据生成了一个3*3的矩阵
想请问下,开始给定的这4个数据是怎么给定的?有什么要求?
新人,没有金币,真诚感谢高手的回答!
附hamilton的代码:@------ Input initial values for parameters ------------ @
/* The order in which variables are represented is as follows
constant term in regression
autoregressive terms in regression
initial variance parameter
constant term in ARCH equation
ARCH params in state 1
next elements: when izz =0 these are the transition probs
when izz =1 these are params v(i,j) such that
p(i,j) = v(i,j)^2 / sum j v(i,j)^2
elements are ordered as p11, p22 when ns =2
ordered as p(1,1),p(2,1),...,p(ns,1),
p(1,2),...,p(ns-1,ns) when ns > 2
next (ns - 1) elements: factor squared residuals are divided by
to get non-switching ARCH
leverage parameter
degrees of freedom parameter for t distribution */
proc startval; @procedure to set starting values @
local th;
let th[11,1] =
0.34775 0.25589 0.55992 0.06036 0.16047 0.051751
0.99195 0.99907 5.7857 0.44348 3.7547 ;
我把状态改为2种状态了,所以初始值只有11个值,第六七个数是用来给出转移概率的,这两个数据有什么要求?