2009年4月22日 星期三

[WinBUGS] 常見的錯誤訊息整理..

Checking Model
  • Missing closing square bracket:
  • Expected right parenthesis:
  • Invalid or unexpected token scanned: Syntax(check that you have as many left as right brackets and parentheses and that you've given all distributions the appropriate number of parameters)
  • Expected a comma:
  • Unknown type of probability distribution:
Loading data
  • Array index is greater than array upper bound for mu: You've read in less lines of data mu[] (entries in a vector) than the program expects.
  • Expected a closing square bracket: Columns in a matrix must have a header which includes [] (e.g. "block")
  • Expected key word end: Matrix must end with the word "END" on one line.
  • Expected variable name: You're reading in data that you haven't defined in the model
Compile
  • Multiple definitions of node mu[1]: You might have defined your data (i.e. what you read in) in your model; logical nodes (i.e. those on the lefthand side of a "<-" cannot also be data.
  • Logical expression contains too many operands: 有遇到過一次, 在進行regression的interaction時, 似乎是運算符號太多導致這個階段不給過, 想辦法減少就OK了!!
Gen.inits
  • Shape parameter (r) of gamma too small: Make your gamma priors less diffuse. (e.g. try gamma(1,0.1))
Running model
  • TRAP (undefined real result):



參考資料
http://www.uwyo.edu/oglelab/HBWorkshop/HintsAndTips.pdf

沒有留言: