postOdds: Get the posterior odds between a point estimator and a null...

Description Usage Arguments Examples

View source: R/postOdds.R

Description

Evaluates the density at the null hypothesis vs the density at the estimate, and calculates a posterior p-value as the percentage of the density at the null hypothesis out of the value of density at the point estimate. If the value of the density at the estimate and null are equivalent, then the probability of the null hypothesis is 1.

The posterior odds ratio in favor of the null hypothesis is calculated as p / (1 - p).

While similar to the Savage-Dickey density ratio method of calculating Bayes Factors, the posterior odds ratio evaluates P(H0 | Data) / P(H | Data ), while the Bayes Factor evaluates P(H0 | Data) / P(H0). That is, the Bayes Factor evaluates the increase in probability relative to the prior, while the posterior odds is the relative strength of evidence in favor of the null hypothesis.

Guidelines for interpretation are given in a figure below, however, these are intended as rough guidelines for interpreting a continuous measure of evidence. The levels of evience given below are not intended to be significance thresholds, but rather, "mile-markers".


Usage

1
2
postOdds(fit, keeppars = c("Intercept", "beta"), H0 = 0,
  method = "mean")

Arguments

fit

a runjags or stanfit object. Alternatively, a numeric vector can be provided.

keeppars

The name of the parameters. Can use "beta" to match up with all betas, ie, "beta[1]", "beta[2]", etc. Defaults to c("Intercept", "beta").

H0

a single value or a vector of values for the null hypothesis. Defaults to zero but this is not appropriate for a binomial test. Be sure to pick a reasonable null hypothesis. If only one values is provided for multiple parameters this value will be used for all tests.

method

whether the mean (default), "median", or a kernel density estimate of the "mode" should be used for the hypothesis test

Examples

1

abnormally-distributed/Bayezilla documentation built on Oct. 31, 2019, 1:57 a.m.