Samplers & adaptation
Random-walk Metropolis-Hastings
Continuous parameters use adaptive scalar random-walk Metropolis-Hastings by default:
param beta(p);
# equivalent to:
param beta(p) sampler=rwmh;
Each coordinate has its own proposal scale. During burn-in the scale is adapted toward a target acceptance rate of approximately 0.44; adaptation is frozen for retained sampling.
Slice sampling
A continuous declaration can instead request scalar stepping-out / shrinkage slice sampling:
param beta(p) sampler=slice;
The slice width is adapted during burn-in and then frozen. Slice and RWMH declarations can be mixed in one model:
param a(1) sampler=slice;
param b(1) sampler=rwmh;
Both samplers use the same parameter-local block target and the same transactional cache machinery.
Discrete parameters
dparam gamma(p, 0, 1);
Bounded discrete coordinates use exact finite-state updates rather than either continuous sampler. A continuous sampler= modifier is therefore invalid on dparam.
Choosing between RWMH and slice
The statistical target does not change when switching the continuous sampler. The choice affects how a scalar coordinate is explored. For either choice, the block must still contain the complete local target and all attached deterministic cache updates must remain exact.
The project’s sampler tests include normal-posterior recovery, mixed slice/RWMH declarations, parser checks, and a test that slice sampling preserves transactional cache correctness.