if (instantiate::stan_cmdstan_exists()) {
data(actg019)
data(actg036)
## take subset for speed purposes
actg019 = actg019[1:100, ]
actg036 = actg036[1:50, ]
data_list = list(currdata = actg019, histdata = actg036)
formula = cd4 ~ treatment + age + race
family = poisson('log')
a0 = 0.5
d.pp = glm.pp(
formula = formula, family = family,
data.list = data_list,
a0.vals = a0,
chains = 1, iter_warmup = 500, iter_sampling = 1000
)
glm.logml.pp(
post.samples = d.pp,
bridge.args = list(silent = TRUE),
chains = 1, iter_warmup = 1000, iter_sampling = 2000
)
}
Run the code above in your browser using DataLab