If I have unused vectors in my data object, JAGS issues a warning about that. I think it's safe to ignore this warning if the unused vectors are there only for sanity checks, is this correct?
There's one issue with this which I've run into: if you leave unused data lying around, sooner or later you might give the same name to an unobserved node and, again, get a likelihood you didn't expect.
Good point. Ambiguity over which variables are data and which are parameters is built into the BUGS language, so there is no easy way to handle this.
Yes it's just a sanity check to catch spelling mistakes. For example, if you have variable "Outcome" in your BUGS description of the model but provide data values for "outcome", you will get a warning about "outcome" being unused. This will alert you to the fact that the resulting Markov chain - while valid - is not what you really want because the posterior is not conditioned on "Outcome". Similarly, if you want to initialize a parameter "theta.new" but put "theta_new" in your initial values, then you will get a warning about unused "theta_new" and know that the initialization has not worked properly.
On the other hand, it is convenient to use the same data and initial values for two nested models, one of which suppresses the variable "theta", say. In this case, you would expect a warning about unused "theta" in the smaller model so you can ignore it.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.