R/INLA_CritSum.R

Defines functions INLA_CritSum

Documented in INLA_CritSum

#' Function to summarise criteria from an INLA model
#' 
#' @param x INLA model to summarise
#' @export
INLA_CritSum <- function(x) {
  d <- data.frame(Model = deparse(substitute(x)), 
                  DIC = x$dic[1], 
                  WAIC = x$waic[1], 
                  CPO = -sum(log(x$cpo$cpo)), 
                  MLIK = x$mlik[1])
  return(d)
}
jpablo91/Pabloverse documentation built on April 11, 2024, 2:54 p.m.