s04085590 发表于 2012-8-18 21:20 
讲抽出的有效样本进行平均即可,比如说,sigma_t,1,sigma_t,2,.......sigma_t,N, 则
sigma-t的贝叶斯估计 ...
谢谢啊
这是别人写的SV-T的程序。σt是上面的theta吗?我stats按钮按出来的结果如下,共867个跟我的样本数一样,可是为什么均值会是负数呢??
model{
for(i in 1:n)
{y
~dt(0,p,omega)
p<-exp(-theta)
}
theta[1]~dnorm(mu,itau2)
for(j in 2:n)
{theta[j]~dnorm(theta2[j],itau2)
theta2[j]<-mu+phi*(theta[j-1]-mu)}
phi<-2*phi1-1
tau<-sqrt(1/itau2)
mu~dnorm(0,0.01)
itau2~dgamma(2.5,0.025)
phi1~dbeta(20,1.5)
omega~dchisqr(8)
}
# Initial value
list(phi1=0.975, mu=0, itau2=50, omega=8)
这是别人写的SV-T的程序。σt是上面的theta吗?我stats按钮按出来的结果如下,共867个跟我的样本数一样,可是为什么均值会是负数呢??
mean sd MC_error val2.5pc median val97.5pc start sample
theta[1] -0.1069 10.01 0.1481 -19.58 -0.001143 19.34 501 4500
theta[2] -0.1082 10.01 0.1479 -19.71 -0.01056 19.39 501 4500
theta[3] -0.109 10.01 0.1479 -19.52 -0.05821 19.43 501 4500
theta[4] -0.111 10.01 0.1479 -19.67 -0.05483 19.34 501 4500
theta[5] -0.1067 10.01 0.148 -19.61 -0.01831 19.36 501 4500