Given a vector of data and standard deviations (sd equals 1 for Cauchy
prior), find the value or vector (heterogeneous sampling standard
deviation with Laplace prior) of thresholds corresponding to the
marginal maximum likelihood choice of weight.
Usage
tfromx(x, s = 1, prior = "laplace", bayesfac = FALSE, a = 0.5,
universalthresh = TRUE)
Arguments
x
Vector of data.
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
x. Ignored if Cauchy prior is used.
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.
universalthresh
If universalthresh = TRUE, the thresholds
will be upper bounded by universal threshold; otherwise, the
thresholds can take any non-negative values.
Value
The numerical value or vector of the estimated thresholds is
returned.
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.