R/quanfun.R

Defines functions quanfun

#' @importFrom stats quantile
quanfun <- function(x,prob)
{
  q_beta = as.matrix(quantile(x,c(prob,(1-prob))))
  pp = prod(q_beta)
  if(sign(pp)==1) {1}
  else {0}
}

Try the Bayenet package in your browser

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

Bayenet documentation built on April 4, 2025, 12:26 a.m.