testH0: Generate a Bayesian p-value for a Hypothesis Test

Description Usage Arguments Details Value Author(s)

Description

Computes the posterior probability of the null hypothesis being true.

Usage

1
testH0(fit, parameter, H0, alternative = "!=")

Arguments

fit

a bsmfit object

parameter

the name of the parameter to test

H0

the null hypothesis value

alternative

the alternative hypotheis, one of "!=", "<" or ">"

Details

The parameter has a posterior distribution, and this function computes the posterior probability that the parameter is consistently larger or smaller than the hypothesised value, which ever is smaller,

min(Pr(theta > H0), Pr(theta < H0))

In the case of a one-sided test, the probability is simply the posterior probability that the parameter is greater than, or smaller than, the hypothesised value.

Value

numeric

Author(s)

Tom Elliott


tmelliott/bsm documentation built on May 31, 2019, 4:38 p.m.