I am trying to run a model in JAGS via the R2jags package in R. The model code is attached.
When I attempt to run this model, I get the following error message:
Error in jags.model(model.file, data = data, inits = init.values, n.chains = n.chains, :
Compilation error on line 35.
Unable to resolve node q[1,1:8]
This may be due to an undefined ancestor node or a directed cycle in the graph
The model works fine in WinBUGS, so I know all nodes are defined. I don't know what a "directed cycle" is and am not finding much online or in the JAGS user manual that is particularly illuminating. I am therefore having difficulty figuring out what the problem is.