在SWARCH模型中一直有个问题没弄清楚,就是这个程序里有一部分算outprob的,如下面程序,本人愚钝,请教各位大侠,这个outprob的作用是什么?
@ ------------The basic filter iteration is contained here ----------- @
f = 0;
it = 1;
do until it > captst;
if ks == 2; @calculate predicted variances and outlier probs if
desired @
varfor[it+nk-1,1] = heta[it,.]*chsi;
if tarch == 0;
hprob = cdfnc(resid[it+nk-1,1]./sqrt(heta[it,.]));
elseif tarch == 1;
hprob = cdftc(resid[it+nk-1,1]./
sqrt(heta[it,.]*(nu-2)/nu),nu);
endif;
outprob[it+nk-1,1] = hprob*chsi;
endif;
fx = chsi .* eta[it,.]';
fit = sumc(fx);
skif[it,.] = fx'/fit;
f = f + ln(fit);
chsi = fm*fx/fit;
it = it+1;
endo;
感谢大侠指教!