Re: [R] Problems with R2WinBUGS

2008-04-18 Thread isabella

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

References

   1. mailto:[EMAIL PROTECTED]
   2. http://www.ghement.ca/
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problems with R2WinBUGS

2008-04-17 Thread isabella

   Dear Ben,

   Thank you very much for your reply to my R2WinBUGS query.  As requested, I
   am attaching the following files to this e-mail:

   1) The .odc file containing the WinBUGS code I am trying to run from R.  The
   nodes to be monitored for posterior inference are: T, best, d, lor, mu, or
   and p.

   2) The .R file containing the call to the bugs() function in the package
   R2WinBUGS.

   3)  The .bug file containing the model specification used when calling
   bugs().
   Please  note  that  I  have tried to specify the initial values of the
   parameters  using a list rather than a function (as suggested by Peter
   Alspach), and got the following error message:

   Error in bugs(data, inits, model.file = model.bug, parameters = c(T,  :
 Number of initialized chains (length(inits)) != n.chains

   Many thanks for any insight you may be able to provide into why the call to
   R2WinBUGS breaks down.  In case this may be needed, I am using R 2.6.2 and
   WinBUGS 1.4.

   Kind regards,

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

   On Wed , Ben Bolker sent:
   
 ghement.ca writes:
 
 
  Hello,
 
  I am trying to use R2WinBUGS to conduct a mixed treatment comparison
 (MTC)
  analysis.
  Thank you in advance for any help you may be able to provide!
 
 Can you please provide your model.bug file?
 Ben Bolker
 __
 [EMAIL PROTECTED] mailing list
 [4]https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 [5]http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

References

   1. mailto:[EMAIL PROTECTED]
   2. http://www.ghement.ca/
   3. javascript:top.opencompose('[EMAIL PROTECTED]','','','')
   4. 
file://localhost/tmp/parse.php?redirect=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help
   5. 
file://localhost/tmp/parse.php?redirect=http%3A%2F%2Fwww.R-project.org%2Fposting-guide.html
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problems with R2WinBUGS

2008-04-16 Thread Ben Bolker
 isabella at ghement.ca writes:

 
 
Hello,
 
I am trying to use R2WinBUGS to conduct a mixed treatment comparison (MTC)
analysis.  
Thank you in advance for any help you may be able to provide!
 

  Can you please provide your model.bug file?

  Ben Bolker

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.