1

使用 JAGS 时,如何以以下格式接收模型的输出:

Inference for Bugs model at "model.txt", fit using jags,
3 chains, each with 10000 iterations (first 5000 discarded)
n.sims = 15000 iterations saved
mu.vect sd.vect 2.5% 25% 50% 75% 97.5% Rhat n.eff
mu 9.950 0.288 9.390 9.755 9.951 10.146 10.505 1.001 11000
sd.obs 3.545 0.228 3.170 3.401 3.534 3.675 3.978 1.001 13000
deviance 820.611 3.460 818.595 819.132 819.961 821.366 825.871 1.001 15000

我假设,与 BUGS 一样,它会在模型​​完成时出现,但是我只得到以下格式的内容:

Compiling model graph
   Resolving undeclared variables
   Allocating nodes
Graph information:
   Observed stochastic nodes: 1785
   Unobserved stochastic nodes: 1843
   Total graph size: 61542

Initializing model

  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100%

为基本问题道歉。如果有人可以提供有用的 JAGS 介绍材料,那也很有用。

亲切的问候。

4

1 回答 1

1

如果你只得到“加号”,这意味着你只初始化了模型。当 jags 真正运行时,它通常会在之后产生“***”标志。所以你在这里遗漏了一行(很高兴看到你的代码)。例如,如果你使用 r2jags,你会写:

out <- jags(data = data, parameters.to.save = params, n.chains = 3, n.iter = 90000,n.burnin = 5000,
                      model.file = modFile)
out.upd <- update(abundance.out.mod, n.iter=10000)
于 2016-10-13T14:05:57.227 回答