tfromx {EbayesThresh} | R Documentation |
Given a vector of data, find the threshold corresponding to the marginal maximum likelihood choice of weight.
tfromx(x, prior = "laplace", bayesfac = FALSE, a = 0.5)
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. |
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.
The numerical value of the estimated threshold is returned.
Bernard Silverman
See ebayesthresh
and http://www.bernardsilverman.com
tfromx(x=rnorm(100, c( rep(0,90), rep(5,10))), prior="cauchy")