【文件属性】:
文件名称:StanCat:从stanfit对象创建毛虫图
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-05 18:09:58
R
斯坦猫
版本0.1
这个包有一个简单的功能: stan_caterpillar 。 它为使用创建的stanfit对象中的后验分布创建了毛毛虫图。
您可以使用正则表达式来标识参数,以便可以使用非常紧凑的代码轻松绘制许多参数。
例子
首先像往常一样运行您的Stan模型:
# Create Stan model
library( rstan )
rstan_options( auto_write = TRUE )
options( mc.cores = parallel :: detectCores())
scode <- "
parameters {
real y[2];
}
model {
y[1] ~ normal(0, 1);
y[2] ~ double_exponential(0, 2);
}
"
#
【文件预览】:
StanCat-master
----.gitignore(29B)
----NAMESPACE(296B)
----R()
--------stan_caterpillar.R(5KB)
--------utils.R(673B)
----.Rbuildignore(47B)
----man()
--------stan_caterpillar.Rd(2KB)
----README.md(1KB)
----README.Rmd(1KB)
----StanCat.Rproj(423B)
----figure()
--------Example1-1.png(10KB)
----DESCRIPTION(529B)
----NEWS(133B)