I thought the logdet bug was fixed after version 2.2.0. However, I still run into an error message when trying to get logdet of a symmetric positive definite matrix (for sure), which is matrix W in the codes below. Any advice will be appreciated.

model

{

for(i in 1:2){

for(j in 1:2){

I[i,j] <- equals(i,j)

}

}

for(i in 1:2){ tmp.mean[i] <- 0 }

for(i in 1:(2+1)){

tmp[1:2,i] ~ dmnorm(tmp.mean[],I[,])

}

for(i in 1:(2+1)){

for(j in 1:2){

for(k in 1:2){

W0[j,k,i] <- tmp[j,i]*tmp[k,i]

}

}

}

for(j in 1:2){

for(k in 1:2){

W[j,k] <- sum(W0[j,k,])}}

D <- logdet(W)

}