R/cpo.R

Defines functions cpo

Documented in cpo

#' Conditional predictive ordinate function
#'
#' This function computes conditional predictive ordinates for each data point.
#'
#' For internal use.
#'
#' @keywords internal
#' @examples
#'
#' ## The function is currently defined as
#' function(obj) {
#'   fx <- obj$fx
#'   cpo <- 1 / apply(1 / fx, 1, mean)
#'   return(cpo)
#' }
cpo <-
  function(obj) {
    fx <- obj$fx
    cpo <- 1 / apply(1 / fx, 1, mean)
    return(cpo)
  }

Try the BNPdensity package in your browser

Any scripts or data that you put into this service are public.

BNPdensity documentation built on April 1, 2023, 12:10 a.m.