Matrix symmetry might depend on numerical precision issues. The older version of JAGS had a bug related to this issue for multivariate normal nodes. This simple function can fix the issue, but new JAGS versions do not require such intervention.
UTF-8
1.1
make.symmetric(x)
Arguments
x: A square matrix.
Details
The function takes the average as (x[i, j] + x[j, i]) / 2
for each off diagonal cells.
Returns
A symmetric square matrix.
Note
The function works for any matrix, even for those not intended to be symmetric.