R‎ > ‎

WinBUGS Errors

This list is a catalog of WinBUGS errors that I have encountered and fixed. Hopefully they save you some pain and suffering.

Trap 66 (postcondition violated)
Variance priors are possible culprits. Change the prior on the variances from dunif(0,100) to dunif(0,10) fixed the problem.changing the prior on the random effects standard deviation from dunif(0, 100) to dunif(0, 10) solved my problem.

incompatible copy
This can arise for a variety of reasons, here's one common one. The bugs function in the R2WinBUGS package will look in the working directory for any file with a .data extension and assume that it's data. If you have any files with a .data extension in the working directory, WinBUGS will try and load them. If they are not meant to be read by WinBUGS, you will get this error. Check your working directory for any files with .data extensions and rename them and the error should go away.

This error also arises when you include a variable in a hierarchical model that has multiple levels, but that does not depend on some overall mean. I.E. say you specified alpha[level[n]] in your model and gave this a prior of alpha[l] ~ dnorm(0,1E-6). This will produce the same error.

Comments