
Bridge sampling estimate of a ratio of normalising constants
Source:R/bridgs_native.R
morie_bridgs.RdEstimates \(r = c_1 / c_2\) from draws under each unnormalised density using the optimal bridge of Meng and Wong (1996), eq. (3.5), evaluated by their Sec. 4 fixed-point iteration. The estimator uses BOTH sets of draws, which is what makes it far more stable than a one-sided importance-sampling ratio when the two densities overlap only partially.
References
Meng, X.-L. and Wong, W. H. (1996). Simulating ratios of normalizing constants via a simple identity. Statistica Sinica, 6, 831-860.
Examples
set.seed(1)
morie_bridgs(draws1 = as.list(rnorm(100)), draws2 = as.list(rnorm(100, 0.5)),
log_q1 = function(x) -0.5 * x^2,
log_q2 = function(x) -0.5 * (x - 0.5)^2)
#> $ratio
#> [1] 0.9842358
#>
#> $log_ratio
#> [1] -0.01588974
#>
#> $iterations
#> [1] 7
#>
#> $converged
#> [1] TRUE
#>
#> $n1
#> [1] 100
#>
#> $n2
#> [1] 100
#>
#> $method
#> [1] "Meng-Wong iterative optimal bridge (eq. 3.5 / Sec. 4)"
#>