As with the t.test
function bayes.t.test
estimates one of
three models depending on the arguments given. All three models are based on
the Bayesian Estimation Supersedes the t test (BEST) model developed by
Kruschke (2013).If one vecor is supplied a one sample BEST is run. BEST assumes the data ($x$)
is distributed as a t distribution, a more robust alternative to the normal
distribution due to its wider tails. Except for the mean ($\mu$) and the
scale ($\sigma$) the t has one additional parameter, the
degree-of-freedoms ($\nu$), where the lower $\nu$ is the wider the
tails become. When $\nu$ gets larger the t distribution approaches the
normal distribution. While it would be possible to fix $\nu$ to a single
value BEST instead estimates $\nu$ allowing the t-distribution to become
more or less normal depending on the data. Here is the full model for the one
sample BEST:
$$x_i \sim \mathrm{t}(\mu, \sigma, \nu)$$
$$\mu \sim \mathrm{Normal}(M_\mu, S_\mu)$$
$$\sigma \sim \mathrm{Uniform}(L_\sigma, H__\sigma)$$ $$\nu \sim \mathrm{Shifted-Exp}(1/29,
\mathrm{shift}=1)$$
one_sample_best_diagram.pngA graphical diagram of the one sample the
BEST model
The constants $M[\mu], S[\mu],
L[\sigma]$ and $H[\sigma]$ are set so that the priors on
$\mu$ and $\sigma$ are essentially flat.
If two vectors are supplied a two sample BEST is run. This is essentially the
same as estimaiting two separate one sample BEST except for that both groups
are assumed to have the same $\nu$. Here is a Kruschke style diagram
showing the two sample BEST model:
two_sample_best_diagram.pngA graphical diagram of the two sample the
BEST model
If two vectors are supplied and paired=TRUE
then the paired difference
between x - y
is modeled using the one sample BEST.