Skip to contents

Quantifies the sampling variability of the fitted mixture itself by a Bayesian (weighted) bootstrap: each replicate re-weights the fit's own observations with Dirichlet(1, ..., 1) weights and refits by a warm-started weighted EM. In regime "kld" the observations are the fit's cached importance draws with their self-normalised weights, so a replicate costs zero new target evaluations; in regimes "sample" and "moment" the observations are the target's samples. Summaries of any functional of the proxy are then read off the ensemble with proxy_functional_ci() – functional-space intervals sidestep the label-switching that makes parameter-space intervals incoherent.

Usage

gmm_fit_ensemble(fit, B = 200L, max_iter = 25L, tol = 1e-05, seed = NULL)

Arguments

fit

A gmm_fit whose fitting inputs are recoverable (a regime-"kld" fit carries its importance draws; regimes "sample" and "moment" require the target to carry its samples).

B

Number of bootstrap replicates.

max_iter, tol

Convergence controls for the per-replicate warm-started weighted EM.

seed

Optional integer seed for the replicate weights.

Value

A list of class gmm_ensemble: fit (the base fit), members (a length-B list of gmm), B, and regime.

References

Rubin, D. B. (1981) The Bayesian bootstrap. The Annals of Statistics 9(1), 130–134.

Examples

fit <- fit_proxymix(banana_target(), N = 2L, regime = "kld",
                    is_size = 1500L, max_iter = 20L, seed = 1L)
ens <- gmm_fit_ensemble(fit, B = 30L, seed = 2L)
proxy_functional_ci(ens, gmm_mean)
#>   term     estimate     conf.low  conf.high
#> 1   f1 -0.004937457 -0.081337352 0.07347874
#> 2   f2  0.074421977 -0.003574058 0.19496631