R/laplace.threshzero.R

Defines functions laplace.threshzero

Documented in laplace.threshzero

laplace.threshzero <- function(x, s = 1, w = 0.5, a = 0.5) {
#
# The function that has to be zeroed to find the threshold with the
# Laplace prior.  Only allow a < 20 for input value.
#    
  a <- min(a, 20)
  xma <- x/s - s*a
  z <- pnorm(xma) - 1/a * (1/s*dnorm(xma)) * (1/w + beta.laplace(x, s, a))
  return(z)
}

Try the EbayesThresh package in your browser

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

EbayesThresh documentation built on May 2, 2019, 8:36 a.m.