Skip to contents

BF(H1, H0) = p(X | H1) / p(X | H0) tends to infinity under H1 and to zero under H0. Both evidences are exact here (normal means, H0 keeping no coordinates and H1 keeping two), so the demonstration is arithmetic rather than simulation: only the data are random.

Usage

Ghosalmodselbic(truth_in_H1 = TRUE, n = 2000, seed = 42)

Arguments

truth_in_H1

If TRUE the truth has nonzero mean, so H1 holds.

n

Precision (sample size) of each coordinate.

seed

Seed for the deterministic draw.

Value

List with estimate (log Bayes factor), supports_H1, method.

Details

Formula: log BF = log m_2(y) - log m_0(y).

References

Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 10.5.

Examples

Ghosalmodselbic()
#> $estimate
#> [1] 957.4621
#> 
#> $supports_H1
#> [1] TRUE
#> 
#> $method
#> [1] "Bayes factor consistency (GvdV 2017 sec. 10.5)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"