Skip to contents

BF is roughly exp(-n KL(P0, P-hat)) divided by the prior mass of a KL ball of radius eps_n: the parametric model wins on prior concentration when it actually holds, and loses to the nonparametric one otherwise. The multinomial version is exact – H0 is the uniform on four cells, H1 the full Dirichlet(1,1,1,1) simplex – so no approximation clouds the comparison.

Usage

Ghosalparamnpbf(n = 1500, parametric_truth = TRUE, seed = 42)

Arguments

n

Number of multinomial trials.

parametric_truth

If TRUE the cells are truly uniform.

seed

Seed for the deterministic draw.

Value

List with estimate (log Bayes factor for the nonparametric model), nonparametric_wins, method.

Details

Formula: log m_0 = sum_j c_j log(1/4); log m_1 = lgamma(4) - lgamma(4 + n) + sum_j lgamma(1 + c_j).

References

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

Examples

Ghosalparamnpbf()
#> $estimate
#> [1] -8.952489
#> 
#> $nonparametric_wins
#> [1] FALSE
#> 
#> $method
#> [1] "parametric-vs-NP Bayes factor (GvdV 2017 sec. 10.5.3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"