I will first give the usual disclaimer that I am new to JAGS, and I apologize
if the following question is silly.
The model I am working with uses integral equations, in which the limits of
integration are free parameters of interest. I am working with the numerical
solution, so these limits of integration appear in the model as the upper
and/or lower indices of counters in sums. I am encountering the error:
Error in jags.model(model, data, n.chain = n.chains, n.adapt = n.adapt) :
Compilation error on line 6.
Cannot evaluate upper index of counter i
Is it true that you cannot have unobserved stochastic nodes as upper limits on
counters? If so, this seems like a major limitation to JAGS. Why is this?
I have tried redefining deterministic nodes with the stochastic nodes as
parents and using the deterministic node as the upper index, and encountered
the same problem. Is there a workaround?
If you have a stochastic node as the upper limit of a counter then you are
allowing the dimension of the model to change. Such models is beyond the scope
of JAGS as they require special techniques (reversible jump).
Dave Lunn has done some work with reversible jump in WinBUGS. See David J.
Lunn, Nicky Best, John C. Whittaker. Generic reversible jump MCMC using
graphical models, Statistics and Computing , vol. 19, no. 4, pp. 395-408,
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.