Rev Language Reference


mvSlide - Sliding-Window Move

Proposes additive updates to continuous parameters.

Usage

mvSlide(Real x, RealPos delta, Bool tune, RealPos weight, Probability tuneTarget)

Arguments

x : Real (<stochastic> pass by reference)
The variable on which this move operates.
delta : RealPos (pass by value)
The window size parameter.
Default : 1
tune : Bool (pass by value)
Should we tune the window size during burnin?
Default : TRUE
weight : RealPos (pass by value)
The weight determines the relative frequency with which this move will be attempted. For details, see the description of the 'moveschedule' parameter on the documentation page for 'mcmc()'.
Default : 1
tuneTarget : Probability (pass by value)
The acceptance probability targeted by auto-tuning.
Default : 0.44

Details

The `mvSlide` move updates a parameter by drawing a random number from a uniform distribution and adding the draw to the current value. The move takes arguments that control how often it should be used (`weight`) and its "window size", i.e., the width of the uniform distribution, which determines the size of the changes it proposes (`delta`). When the `tune` argument is set to `TRUE`, the value of `delta` is automatically adjusted so that the acceptance rate of the move reaches `tuneTarget`.

Example

moves = VectorMoves()
p ~ dnUniform(0, 1)
moves.append(mvSlide(p, delta=0.05, weight=1))

See Also