Description Usage Arguments Examples
Evaluates the density at the null hypothesis vs the density at the estimate, and calculates the posterior odds as P(H0 | Data) / P(theta_hat | Data). Taking inspiration from Mills' (2014, 2017) Bayesian Hypothesis Testing approach, the posterior odds are also converted to a probability. The probability is calculated as odds / 1+odds. This provides a p-value type measure without the need to calculate Bayes Factors for conversion to posterior error probabilities. This can be extremely useful when prior samples are not available. Note that Savage-Dickey Density Ratio Bayes Factors evaluate P(H0 | Data) / P(H0) and characterize the change in probability between the null hypothesis in the prior and posterior. Mill's Posterior Odds characterizes the relative posterior probability in the null hypothesis to the point estimate. Hence, the two approaches to calculating odds and p-values differ in what question is answered.
1 | posterior_odds(posterior, H0, method = "mean")
|
posterior |
a vector or data frame of posterior samples |
H0 |
a single value or a vector of values for the null hypothesis |
method |
whether the mean (default) or median should be used for the hypothesis test |
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.