Closed athowes closed 2 years ago
best_idx <- df %>%
group_by(iso3) %>%
summarise(
dic_best_idx = list(which(dic == min(dic))),
waic_best_idx = list(which(waic == min(waic))),
cpo_best_idx = list(which(cpo == max(cpo))),
pit_best_idx = list(which(pit == max(pit)))
)
#' Adding bold for best value to the table
for(i in seq_along(min_ind)) {
table <- table %>%
tab_style(
style = cell_text(weight = "bold"),
locations = cells_body(columns = ?, rows = ?)
)
}
Main thing left to do here is work out a way to have a (single) plot which shows all of the information criteria at once.
Closing this. Point left to think about: what if the criteria disagree?
R-INLA
inbuilt CPO works OK here? Start by adding that