if (instantiate::stan_cmdstan_exists()) {
data(actg019)
actg019 = actg019[1:100, ]
data.list = list(currdata = actg019)
formula = cd4 ~ treatment + age + race
family = poisson('log')
d.post = glm.post(
formula = formula, family = family,
data.list = data.list,
chains = 1, iter_warmup = 500, iter_sampling = 1000
)
glm.logml.post(
post.samples = d.post,
bridge.args = list(silent = TRUE)
)
}
Run the code above in your browser using DataLab