R/phalfcauchy.R

Defines functions phalfcauchy

Documented in phalfcauchy

#' Distribution function half Cauchy
#'
#' Computes the cdf.
#'
#' For internal use
#'
#' @keywords internal
#' @examples
#'
#' ## The function is currently defined as
#' function(q, location = 0, scale = 1) {
#'   ifelse(x < 0, 0, 1) * (pcauchy(q, location, scale) - pcauchy(
#'     0,
#'     location, scale
#'   )) / (1 - pcauchy(0, location, scale))
#' }
phalfcauchy <-
  function(q, location = 0, scale = 1) {
    ifelse(q < 0, 0, 1) * (pcauchy(q, location, scale) - pcauchy(
      0,
      location, scale
    )) / (1 - pcauchy(0, location, scale))
  }

Try the BNPdensity package in your browser

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

BNPdensity documentation built on April 1, 2023, 12:10 a.m.