Skip to contents

With Pi = pi_0 Pi_0 + (1 - pi_0) Pi_1 the posterior weight of whichever model contains the truth tends to one. Both evidences are conjugate and exact here, so the weight is a plain logistic transform of their log-ratio: the small model keeps one coordinate, the large model six.

Usage

Ghosaltwomodeladp(n = 500, truth_dim = 1, pi0 = 0.5, seed = 42)

Arguments

n

Precision (sample size) of each coordinate.

truth_dim

Number of nonzero coordinates in the truth.

pi0

Prior weight of the small model, in (0, 1).

seed

Seed for the deterministic draw.

Value

List with estimate, posterior_weight_small_model, small_model_wins, method.

Details

Formula: w_0 = 1 / (1 + exp(l_1 - l_0)), l_j = log m_{K_j}(y) + log prior weight of model j.

References

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

Examples

Ghosaltwomodeladp()
#> $estimate
#> [1] 0.9999881
#> 
#> $posterior_weight_small_model
#> [1] 0.9999881
#> 
#> $small_model_wins
#> [1] TRUE
#> 
#> $method
#> [1] "two-model adaptation (GvdV 2017 sec. 10.2.3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"