R/qChern.R

Defines functions qChern

Documented in qChern

#' Quantile function of Chernoff's distribution
#'
#' Computes the quantiles of Chernoff's distribution.
#'
#' @param p evaluation point of the quantile function.
#' @return The function returns Chernoff's quantile function evaluated at p.
#' @export
#' @examples
#' qChern(0.5)
qChern <- function(p){
  return(stats::uniroot(function(x){pChern(x)-p},c(stats::qnorm(p,sd=0.52)-0.1,stats::qnorm(p,sd=0.52)+0.1),tol=1e-10)$root)
}

Try the ChernoffDist package in your browser

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

ChernoffDist documentation built on May 31, 2023, 8:14 p.m.