When BvM holds, (1 - alpha)-credible sets have frequentist coverage
tending to 1 - alpha. This is the practical payoff of the whole
chapter: it is what licenses reading a Bayesian interval as a
confidence interval, and it is exactly what fails in the infinite
dimensional cases section 12.4 warns about.
Usage
Ghosalcredsetcov(theta0 = 0.5, n = 400, level = 0.9, n_sim = 400, seed = 42)
Arguments
- theta0
True success probability, in (0, 1).
- n
Trials per replicate.
- level
Nominal credible level; 0.9 uses z = 1.6449, else 1.96.
- n_sim
Number of replicates.
- seed
Seed for the deterministic draws.
Value
List with estimate (empirical coverage),
nominal, gap, method.
Details
Formula: interval = m +/- z sd with m = a/(a+b) and
sd^2 = ab / ((a+b)^2 (a+b+1)) for the Beta(1+S, 1+n-S) posterior.
References
Ghosal & van der Vaart (2017), Fundamentals of
Nonparametric Bayesian Inference, CUP, section 12.5.
Examples
# \donttest{
Ghosalcredsetcov()
#> $estimate
#> [1] 0.86
#>
#> $nominal
#> [1] 0.9
#>
#> $gap
#> [1] 0.04
#>
#> $method
#> [1] "credible-set coverage (GvdV 2017 sec. 12.5)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
# }