1

I want to calculate x1b1+x2b2+......+xpbp. However, p is not known, I cannot write it down in advance. So I want to do the following. But in BUGS it says multiple definitions error.

  betax <- 0
  for(k in 1:p){
    betax <- betax + beta[k]*x[i,k]
  }

Is there any ways to get it done in bugs model?

Leo
  • 23
  • 3

0 Answers0