BNPdensity (version 2019.9.11)

cens_data_check: Censoring data check

Description

Performs censoring data check.

Usage

cens_data_check(xleft, xright)

Arguments

Details

For internal use

Examples

Run this code
# NOT RUN {
## The function is currently defined as
function(xleft, xright) {
  if (any(xright < xleft, na.rm = T)) {
    stop("in censored data, left bound not always smaller than right bound")
  }
  if (any(mapply(FUN = function(xileft, xiright) {
    is.na(xileft) & is.na(xiright)
  }, xleft, xright))) {
    stop("in censored data, there is an NA NA")
  }
}
# }

Run the code above in your browser using DataCamp Workspace