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)

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

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)