R/convert.cer.to.d.R

Defines functions convert.cer.to.d

Documented in convert.cer.to.d

#' @rdname nncConversion
#' @export
convert.cer.to.d <- function(cer, eer, eventDesirable=TRUE, eventIfHigher=TRUE,
                             dist = "norm", distArgs=NULL, distNS="stats") {
  qdistFuncName <- paste0("q", dist);
  qdist <-
    function(p) {
      return(
        do.call(
          utils::getFromNamespace(qdistFuncName, ns = distNS),
          c(list(p = p), distArgs)
        )
      );
    }
  if (eventIfHigher) {
    return(qdist(eer) - qdist(cer));
  } else {
    return(qdist(cer) - qdist(eer));
  }
}

Try the ufs package in your browser

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

ufs documentation built on May 29, 2024, 10:30 a.m.