I had another OpenBUGS expected variable name error. (Sorry, no code this time.) Looking back at my own blog, I realized that the error had been in my creation of the variable data that contains all of the variables that OpenBUGS uses. In that case, I had forgotten to give the variable in the list a name, i.e. data <- list(y), so that data$y did not exist. In this case, all variables had the correct names, but I had accidentally included a variable that OpenBUGS did not need. I'm not sure why this should cause an error since I would think OpenBUGS would just disregard any extra variables (possibly with a warning). To reiterate, make sure all of your data passed to the function bugs are used in the OpenBUGS code.

blog comments powered by Disqus


26 October 2011