问题描述
我使用 rstanarm 使用我设置的先验在 R 中运行贝叶斯回归,使用以下代码:
priors <- rstanarm::normal(location = c(-1,0.5,2),scale = c(1,2,0.5))
bmd <- stan_glm(s01_1 ~ pc + a03 + l01,data=bes19,prior = priors,iter=1000,seed=6942)
Exception: mismatch in dimension declared and found in context; processing stage=data initialization; variable name=prior_scale; position=0; dims declared=(19); dims found=(3) (in '/data/hyperparameters.stan' at line 2; included from 'model_continuous' at line 56)
Failed to create the sampler; sampling not done
Error in check_stanfit(stanfit) :
Invalid stanfit object produced please report bug
如果有任何解决方案,我将不胜感激。谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)