shatian 发表于 2012-12-29 19:15 
嗯,好的,那我把数据减少试试,还有,就是我原来在直接用OPENBUGS的时候,出现这个问题,通常是在自动生 ...
初步跑了一下你的数据
结果先供你参考:
library(R2OpenBUGS)
#Data
n=4000
yy=read.table(file="c:/OpenBUGS/shatian/shatian.txt")
r=yy[1:4000,1]
summary(r)
data=list("n","r")
#init
inits = function() {list(mu=0.01,k=0.1,kt=0.01,tauv=0.2,rho=0.1,muy=0.1,lambda=0.1,tauy=0.2,rhoj=0.1,muv=1.5)}
parameters <- c("mu","theta","k","sigv","muy","rhoj","sigy","muv","rho","lambda")
SVCJ.sim <- bugs(data, inits, parameters.to.save=parameters,"svcj.txt",n.chains=1,
n.thin=1,n.iter=15000,n.burnin=10000,debug=TRUE,DIC=TRUE,bugs.seed=9,
working.directory = "c:/OpenBUGS/shatian/")
attach.bugs(SVCJ.sim)
print(SVCJ.sim,digits=4)
Inference for Bugs model at "svcj.txt",
Current: 1 chains, each with 15000 iterations (first 10000 discarded)
Cumulative: n.sims = 5000 iterations saved
mean sd 2.5% 25% 50% 75% 97.5%
mu 0.0280 0.0135 0.0011 0.0188 0.0282 0.0374 0.0540
theta 0.5059 0.0521 0.4091 0.4701 0.5039 0.5392 0.6182
k 0.0333 0.0049 0.0244 0.0302 0.0330 0.0362 0.0435
sigv 0.1068 0.0063 0.1002 0.1021 0.1048 0.1096 0.1235
muy 0.6376 0.4365 -0.1371 0.3213 0.6068 0.9380 1.5300
rhoj -3.1360 0.7464 -4.9910 -3.5590 -2.9755 -2.5710 -2.0700
sigy 2.4183 0.2652 1.8850 2.2310 2.4200 2.6020 2.9420
muv 1.9954 0.2952 1.5510 1.7930 1.9555 2.1240 2.7344
rho -0.0169 0.1238 -0.2511 -0.1011 -0.0245 0.0599 0.2483
lambda 0.0264 0.0046 0.0180 0.0232 0.0262 0.0293 0.0362
deviance 9871.1906 65.5752 9742.0000 9825.0000 9874.0000 9917.0000 9994.0000
DIC info (using the rule, pD = var(deviance)/2)
pD = 2150.1 and DIC = 12021.2
DIC is an estimate of expected predictive error (lower deviance is better).