2016-03-12から1日間の記事一覧

RstanでMCMCの練習

まずは、ポアソン過程の平均値の推定 $ cat poi.stan data{ int J; // number of data int y[J]; } parameters{ real mu; }model{ y[J] ~ poisson(mu); } 平均30のポアソン分布 ###Poison library("rstan") y data fit iter = 1000,chains = 4) print(fit)…