Rev Language Reference


mvCorrelationMatrixElementSwap - Correlation Matrix element swap move.

Swaps elements i and j of the correlation matrix (i != j).

Usage

mvCorrelationMatrixElementSwap(MatrixReal x, RealPos weight, Probability tuneTarget)

Arguments

x : MatrixReal (<stochastic> pass by reference)
The variable on which this move operates.
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

Example


# we draw a correlation matrix from an LKJ distribution
R ~ dnLKJ(eta=1, dim=5)

# we specify an element swap move
moves[1] = mvCorrelationMatrixElementSwap(R)