Rev Language Reference


mvAdaptiveRJSwitch - Adaptive reversible-jump (RJ) move

A move that performs a reversible-jump between a fixed value and a value drawn from a distribution. The standard approach is that the value is drawn from the prior distribution. As this can be inefficient for broad priors, we learn here the proposal distribution. Currently, we only support a normal distribution. Thus, we learn the mean and variance of this normal distribution during the learning phase before actually applying it.

Aliases

  • mvAdaptiveReversibleJumpSwitch

Usage

mvAdaptiveRJSwitch(Real x, Natural waitBeforeLearning, Natural waitBeforeUsing, Natural updateEvery, RealPos weight)

Arguments

x : Real (<stochastic> pass by reference)
The variable on which this move operates.
waitBeforeLearning : Natural (pass by value)
Number of tries before learning.
Default : 1000
waitBeforeUsing : Natural (pass by value)
Number of tries before using.
Default : 10000
updateEvery : Natural (pass by value)
How frequent to update.
Default : 1
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

Example

# create a vector of moves
moves = VectorMoves()

# draw a variable from an RJ mixture
theta ~ dnReversibleJumpMixture(0.01,
                                dnUnif( 0.0, 0.1 ),
                                0.5)

# place a move on the variable
moves.append( mvAdaptiveRJSwitch(theta,
                                 waitBeforeLearning=100,
                                 waitBeforeUsing=1000,
                                 updateEvery=10,
                                 weight=10.0) )

See Also