Learn R Programming

EbayesThresh (version 1.4-12)

beta.laplace: Function beta for the Laplace prior

Description

Given a single value or a vector of \(x\) and \(s\), find the value(s) of the function \(\beta(x;s,a)=g(x;s,a)/fn(x;0,s) - 1\), where \(fn(x;0,s)\) is the normal density with mean 0 and standard deviation \(s\), and \(g\) is the convolution of the Laplace density with scale parameter \(a\), \(\gamma_a(\mu)\), with the normal density \(fn(x;\mu,s)\) with mean \(mu\) and standard deviation \(s\).

Usage

beta.laplace(x, s = 1, a = 0.5)

Arguments

x

the value or vector of data values

s

the value or vector of standard deviations; if vector, must have the same length as x

a

the scale parameter of the Laplace distribution

Value

A vector of the same length as x is returned, containing the value(s) \(beta(x)\).

References

See ebayesthresh and http://www.bernardsilverman.com

See Also

beta.cauchy

Examples

Run this code
# NOT RUN {
beta.laplace(c(-2,1,0,-4,8,50), s=1)
beta.laplace(c(-2,1,0,-4,8,50), s=1:6, a=1)
# }

Run the code above in your browser using DataLab