gpt4 book ai didi

r - 如何从 rstanarm 对象中提取 stan 代码

转载 作者:行者123 更新时间:2023-12-01 12:09:17 36 4
gpt4 key购买 nike

是否有可能在 rstanarm 中提取用于 MCMC 采样的 stan 代码?

我想将我自己的模型参数化和先前选择与 rstanarm 中使用的参数化进行比较。

最佳答案

你可以执行

library(rstanarm)
example(example_model)
rstan::get_stanmodel(example_model$stanfit)

查看 Stan 代码或查看 GitHub .但是,它不打算供人类阅读,并且由于 #include 而不是特别可读。语句和支持的大量选项。

关于r - 如何从 rstanarm 对象中提取 stan 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53481697/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com