Re: [R] Problems with R2WinBUGS

From: <>
Date: Fri, 18 Apr 2008 10:41:05 -0500


   Further to my previous e-mail, I think I know why I am having problems with    the initialization of model parameters in R2WinBUGS. My model.bug file    contains a portion of code which defines some pairwise odds ratios (e.g.,    or[1,2], or[1,3], or[1,4], or[2,3], or[2,4], or[3,4]) as seen below:

   for (c in 1:(NT-1)) {

        for (k in (c+1):NT) {

               or[c,k] <- log(d[k] - d[c])



   Apparently, R2WinBUGS can't recognize these values because they form an    incomplete matrix. In trying to solve this issue, I arrived at the    conclusion that R2WinBUGS may not be able to recognize WinBUGS parameters    specified as a matrix (be it complete or incomplete). Is my understanding    correct?

   Any thoughts on how to overcome this predicament would be greatly    appreciated. (Thank you very much to Peter Alspach for helping me to narrow    down this problem.)

   Many thanks!


   Isabella R. Ghement, Ph.D.
   Ghement Statistical Consulting Company    301-7031 Blundell Road, Richmond, B.C., Canada, V6Y 1J5    Tel: 604-767-1250
   Fax: 604-270-3922
   E-mail: [1]
   Web: [2]


  2. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code.
Received on Fri 18 Apr 2008 - 15:57:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Apr 2008 - 17:30:30 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive