wfromt: Mixing weight from posterior median threshold

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

View source: R/wfromt.R

Description

Given a value or vector of thresholds and sampling standard deviations (sd equals 1 for Cauchy prior), find the mixing weight for which this is(these are) the threshold(s) of the posterior median estimator. If a vector of threshold values is provided, the vector of corresponding weights is returned.

Usage

1
wfromt(tt, s = 1, prior = "laplace", a = 0.5)

Arguments

tt

Threshold value or vector of values.

s

A single value or a vector of standard deviations if the Laplace prior is used. If a vector, must have the same length as tt. Ignored if Cauchy prior is used.

prior

Specification of prior to be used; can be "cauchy" or "laplace".

a

Scale factor if Laplace prior is used. Ignored if Cauchy prior is used.

Value

The numerical value or vector of values of the corresponding weight is returned.

Author(s)

Bernard Silverman

References

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

See Also

tfromw

Examples

1
wfromt(c(2,3,5), prior = "cauchy" )

EbayesThresh documentation built on Aug. 8, 2017, 9:09 a.m.