Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我确实在rstanarm. 当我执行以下代码时,它给出了所有迭代的预测变量的平均值:
rstanarm
summary(TestGLM) print(TestGLM)
我想要我的解决方案在每次迭代中预测变量的值。谁能帮我解决这个问题?
您可以提取每个系数的平局,如下所示:
require(rstanarm) TestGLM <- stan_glm(mpg ~ wt, data = mtcars) draws <- as.data.frame(TestGLM) print(colnames(draws)) str(draws) # See http://mc-stan.org/rstanarm/reference/as.matrix.stanreg.html