【发布时间】:2018-03-12 21:31:35
【问题描述】:
我写信是为了了解"linear.predictors" 返回的内容是什么
stan_glm() 对象。
显然,"linear.predictors" 与用户提供的预测器不同(文档没有帮助)。
无论如何,有没有办法从stan_glm() 对象中获取预测值?
这是一个单一的预测变量(即 mom_iq)示例:
library(rstanarm)
data(kidiq)
d <- kidiq
fit <-stan_glm(kid_score ~ mom_iq,
data = d,
prior = normal(0, 2.5),
prior_intercept = normal(0, 10),
prior_aux = cauchy(0, 100))
max(fit$linear.predictors) # 110.5605 # As can be seen, these are not the same
max(d$mom_iq) # 138.8931
【问题讨论】:
标签: r bayesian rstan hierarchical-bayesian rstanarm