tfromx {EbayesThresh}R Documentation

Find threshold from data

Description

Given a vector of data, find the threshold corresponding to the marginal maximum likelihood choice of weight.

Usage

tfromx(x, prior = "laplace", bayesfac = FALSE, a = 0.5)

Arguments

x vector of data
prior specification of prior to be used; can be "cauchy" or "laplace"
bayesfac specifies whether Bayes factor threshold should be used instead of posterior median threshold
a scale factor if Laplace prior is used. Ignored if Cauchy prior is used.

Details

First, the routine wfromx is called to find the estimated weight. Then the routine tfromw is used to find the threshold. See the documentation for these routines for more details.

Value

The numerical value of the estimated threshold is returned.

Author(s)

Bernard Silverman

References

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

See Also

tfromw, wfromx

Examples

tfromx(x=rnorm(100, c( rep(0,90), rep(5,10))), prior="cauchy")

[Package EbayesThresh version 1.3.0 Index]