Description Usage Arguments Value
View source: R/savage_dickey_bf.R
Approximate the Savage-Dickey density ratio, and compute Bayes factor in favour of null hypothesis. As input it takes a vector of samples, which should represent the posterior distribution of the quantity of interests, usually obtained through MCMC sampling. The function assumes a Gaussian prior (the default is mean 0 and sd 1).
1 2 | savage.dickey.bf(x, x_0 = 0, prior.mean = 0, prior.sd = 1,
plot = F)
|
x |
vector of samples from posterior distribution |
x_0 |
location of point-null hypothesis (usally zero) |
prior.mean |
mean of Gaussian prior used to estiamte the model |
prior.sd |
standard deviation of Gaussian prior used to estiamte the model |
plot |
logical: should the prior and posterior probability be plotted? |
Bayes factor, indicating how likely are the data under the null hypothesis, compared to the alternative.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.