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 how often on average this move will be used per iteration.
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)