postmean: Posterior mean estimator

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

Given a data value or a vector of data, find the corresponding posterior mean estimate(s) of the underlying signal value(s)

Usage

1
postmean(x, w, prior = "laplace", a = 0.5)

Arguments

x

a data value or a vector of data

w

the value of the prior probability that the signal is nonzero

prior

family of the nonzero part of the prior; can be "cauchy" or "laplace"

a

the scale parameter of the nonzero part of the prior if the Laplace prior is used

Value

If x is a scalar, the posterior mean E(theta|x) where theta is the mean of the distribution from which x is drawn. If x is a vector with elements x_1, ... , x_n, then the vector returned has elements E(theta_i|x_i), where each x_i has mean theta_i, all with the given prior.

Note

If the quasicauchy prior is used, the argument a is ignored. If prior="laplace", the routine calls postmean.laplace, which finds the posterior mean explicitly, as the product of the posterior probability that the parameter is nonzero and the posterior mean conditional on not being zero. If prior="cauchy", the routine calls postmean.cauchy; in that case the posterior mean is found by expressing the quasi-Cauchy prior as a mixture: The mean conditional on the mixing parameter is found and is then averaged over the posterior distribution of the mixing parameter, including the atom of probability at zero variance.

Author(s)

Bernard Silverman

References

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

See Also

postmed

Examples

1
2
postmean(c(-2,1,0,-4,8,50), w=0.05, prior="cauchy")
postmean(c(-2,1,0,-4,8,50), w=0.2, prior="laplace", a=0.3)


Search within the EbayesThresh package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.