One front door for inference over a user-defined tgmrf() latent block's
hyperparameter vector theta. mode selects the inference engine, all of
which share the same Laplace body for (beta, z) | theta:
"imh"(default) – Tier-1 exact MCMC: the Laplace body plus an independence-Metropolis bias correction overtheta(the "Laplace + MH debias" composition)."nuts"– Tier-1 exact MCMC: NUTS over the marginalthetaposterior."vi"– Tier-2 structured: a single-path Pathfinder Gaussian fit of thethetaposterior (no bias correction)."nuts_joint"– Tier-1 exact MCMC sampling the FULL joint(beta, z, theta)rather than the Laplace-marginalizedtheta(requires a C++-backend block, seetgmrf_cpp()).
The inference method is an argument, not a parallel verb.
Arguments
- y, n_trials, X
Response, binomial trial counts (or
NULL), and the fixed-effect design matrix.- block
A
tgmrf()latent block.- family, phi
Observation family and its dispersion.
- re_idx, n_re_groups, sigma_re
Optional scalar random-intercept structure.
- mode
Inference engine:
"imh","nuts","vi", or"nuts_joint".- control
A list of numerical / tuning knobs for the chosen
mode(e.g.n_iter,warmup,thin,scalefor"imh";epsilon,max_depth,target_acceptfor the NUTS modes;n_draws,max_lbfgs,lbfgs_tolfor"vi"; plus the sharedpilot_axis_points,max_iter,tol,n_threads,verbose). An unknown knob for the chosenmodeerrors rather than being silently ignored.- ...
Individual
controlknobs may also be passed directly by name; they are merged intocontrol(a named argument here wins over the same name insidecontrol).
See also
tgmrf() for the block, tgmrf_cpp() for the compiled-block form.