SSブログ

[Stan] Multiscale Occupancy Model [統計]

Advanced Hierarchical Modeling in Ecology 10.10節のMultiscale Occupancy ModelをStanに移植してみました。

R Notebookです。

結果です。

Inference for Stan model: stan-39176c995f89.
4 chains, each with iter=2000; warmup=1000; thin=1; 
post-warmup draws per chain=1000, total post-warmup draws=4000.

               mean se_mean    sd   2.5%    25%    50%    75%  97.5% n_eff  Rhat
int_psi       0.861   0.001 0.077  0.698  0.809  0.866  0.921  0.987  3552 1.000
int_theta[1]  0.326   0.001 0.072  0.200  0.275  0.321  0.372  0.485  5657 1.000
int_theta[2]  0.406   0.001 0.082  0.264  0.348  0.401  0.458  0.580  5255 1.000
int_theta[3]  0.325   0.001 0.075  0.197  0.273  0.319  0.373  0.492  5667 0.999
int_theta[4]  0.172   0.001 0.050  0.088  0.136  0.167  0.202  0.284  6680 0.999
int_theta[5]  0.159   0.001 0.050  0.079  0.122  0.153  0.189  0.269  6334 0.999
beta_lpsi     1.271   0.015 0.702  0.172  0.792  1.190  1.631  3.000  2209 1.001
beta_ltheta   0.789   0.002 0.154  0.512  0.684  0.779  0.886  1.107  6014 1.000
beta_lp      -1.297   0.002 0.155 -1.615 -1.401 -1.293 -1.189 -1.016  7306 0.999
sum_z        81.201   0.113 7.027 67.000 77.000 82.000 86.000 94.000  3863 1.000
sum_a        67.476   0.099 6.404 54.000 63.000 68.000 72.000 80.000  4174 1.000

Samples were drawn using NUTS(diag_e) at Sat Oct  5 12:22:01 2019.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

sum_zとsum_aは、観測値の条件づけをはずして計算しているので、BUGSの結果とは異なります。


タグ:STAn
nice!(1)  コメント(0) 
共通テーマ:日記・雑感

nice! 1

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

Facebook コメント