我正在使用BRMS软件包进行分析以进行贝叶斯分析,并且想要捕获系数,标准误差,可信区间(2.5%,50%和97.5%)
我已经拟合了模型,但是现在我想捕获输出,因为想运行它进行仿真
fit3 <- brm(formula = y ~ x1 + x2, prior = c(set_prior("normal(0,1000)", class ="b")), chains=3,
iter=500,warmup=100, thin=2, data = mydata, family = bernoulli, seed=123)````
This is how the output is like
fit3$fit
Inference for Stan model: 08697b2675ef1eaba876413627e71522.
3 chains, each with iter=500; warmup=100; thin=2;
post-warmup draws per chain=200, total post-warmup draws=600.
mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhat
b_Intercept 6.02 0.42 8.48 -10.31 0.25 5.75 11.52 22.13 416 1
b_x1 1.49 0.04 0.64 0.34 1.03 1.45 1.90 2.70 284 1
b_x2 -0.28 0.01 0.24 -0.76 -0.43 -0.27 -0.12 0.19 420 1
lp__ -81.30 0.07 1.29 -84.56 -81.88 -80.97 -80.35 -79.88 382 1
Samples were drawn using NUTS(diag_e) at Mon Aug 12 14:13:04 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).