[R] Problems with R2WinBUGS

isabella at ghement.ca isabella at ghement.ca
Fri Apr 18 17:41:05 CEST 2008


   Hello,

   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

   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]isabella at ghement.ca
   Web: [2]www.ghement.ca

References

   1. mailto:isabella at ghement.ca
   2. http://www.ghement.ca/


More information about the R-help mailing list