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 marble package in your browser

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

marble documentation built on May 29, 2024, 6:44 a.m.