Closed paul-buerkner closed 2 years ago
Thanks for filing this issue! This seems like it's related to the specified joint_log_lik_fn.
What happens if you leave the joint_log_lik_fn
argument as the default (which would then be extract_joint_log_lik
)?
This is how it's currently implemented for brmsfit objects:
extract_joint_log_lik.brmsfit <- function(x, parameter_name = "log_lik", merge_chains = TRUE, ...) {
if (!requireNamespace("brms", quietly = TRUE))
stop("Please load the 'brms' package.", call. = FALSE)
log_lik <- rowSums(brms::log_lik(x))
names(log_lik) <- parameter_name
chains <- x$fit@sim$chains
log_lik <- posterior::draws_array(
log_lik = log_lik,
.nchains = chains
)
return(log_lik)
}
Thanks! That works, but only if I use priorsense:::extract_joint_log_lik
since extract_joint_log_lik
seems to be not exported currently.
Good that it fixed it! Yes, I should export it like extract_log_prior. Will do this soon
This should be fixed in current version
When I run
I get
Is there a place where I need to pass the chain-ID or is this a bug?