Rev Language Reference


mvUpDownScale - Up-Down Proposal for Joint Scaling of Multiple Parameters

Simultaneously scales multiple parameters up, and potentially down, by the same factor.

Usage

mvUpDownScale(RealPos lambda, Bool tune, RealPos weight, Probability tuneTarget)

Arguments

lambda : RealPos (pass by value)
The scaling factor (strength) of the proposal.
Default : 1
tune : Bool (pass by value)
Should we tune the scaling factor 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

This move scales a set of parameters up by a random factor, and optionally scales another set of parameters down by the same value. This may improve the mixing of parameters that we expect to be either positively or negatively correlated, such as speciation and extinction rates or the clock rate and branch durations in time tree inference. The parameters to be scaled up and down can be selected by the `.addVariable()` and `.removeVariable()` methods. The actual scaling factor is equal to exp( lambda * (u - 0.5) ), where lambda is a tuning parameter and u is a random draw from the uniform distribution on [0, 1].

Example

moves = VectorMoves()

speciation_rate ~ dnExponential(10)
extinction_rate ~ dnExponential(10)

# Define the basic properties of the move
up_down_move = mvUpDownScale(lambda=1.0, weight=5.0)

# Add variables to the move to account for their positive correlation
up_down_move.addVariable(speciation_rate, up=TRUE)
up_down_move.addVariable(extinction_rate, up=TRUE)

# Apply the move
moves.append( up_down_move )

Methods

See Also