mc <- nimbleCode({
mu ~ dnorm(0,1)
for(i in 1:2) {
x[i] ~ dnorm(mu, 1)
y[i] ~ dnorm(x[i], 1)
z[i] ~ dnorm(y[i], 1)
}
})
m <- nimbleModel(mc, data = list(z = 1:2))
m$getConditionallyIndependentSets(givenNodes = 'z')
[[1]]
[1] "x[1]" "y[1]"
[[2]]
[1] "x[2]" "y[2]"
but if one doesn't condition on mu then they are not independent.
Also:
m$getConditionallyIndependentSets(givenNodes = 'mu')
Error: SEXP_2_vectorInt called for SEXP that is not a numeric or logica!
Error: We could not handle input type to SEXP_2_vectorInt
but if one doesn't condition on
muthen they are not independent.Also: