使用brms中bayes_factor()导致R与RStudio会话崩溃求助
brms包
bayes_factor()函数导致R/RStudio崩溃的解决办法求助 问题详情
使用brms包的bayes_factor()函数时,R与RStudio会话会直接崩溃。此前已卸载并重装R和RStudio,最初甚至无法拟合brm()模型,执行以下代码后模型拟合功能恢复正常:
remove.packages(c("StanHeaders", "rstan")) install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
目前可以正常设置先验并拟合brm模型,但运行bayes_factor()代码时,R与RStudio仍会崩溃。已知存在类似历史问题,但该问题为一年前的bug,且当前brms的部分功能可正常使用。
已加载的R包
library(rstanarm) library(rstan) library(brms) library(BayesFactor) library(bridgesampling)
会话信息
> sessionInfo() R version 4.2.3 (2023-03-15 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044) Matrix products: default locale: [1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8 [3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.utf8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.2.3 tools_4.2.3 rstudioapi_0.14
请问有什么解决办法吗?
内容的提问来源于stack exchange,提问作者Bommby
相关产品推荐
相关产品推荐

