Skip to content

Commit

Permalink
add improved column names to posterior samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Jan 5, 2024
1 parent c63c301 commit 172e84c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/blav_object_inspect.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,17 @@ blavInspect <- function(blavobject, what, ...) {
draws <- make_mcmc(blavobject@external$mcmcout)
draws <- lapply(draws, function(x) mcmc(x[, idx, drop = FALSE]))
draws <- mcmc.list(draws)
if(add.labels) {
for (i in 1:length(draws)) {
colnames(draws[[i]]) <- labs
}
}
if(what == "hpd"){
pct <- .95
if("level" %in% dotNames) pct <- dotdotdot$level
if("prob" %in% dotNames) pct <- dotdotdot$prob
draws <- mcmc(do.call("rbind", draws))
draws <- HPDinterval(draws, pct)
if(add.labels) rownames(draws) <- labs
}
draws
} else if(what == "mcobj"){
Expand Down

0 comments on commit 172e84c

Please sign in to comment.