title: Choosing Different Distributions based on if - else condition in WinBugs/JAGS
body: <p>I am trying to write a Winbugs/Jags model for modeling multi grain topic models (exactly this paper -> <a href="http://www.ryanmcd.com/papers/mg_lda.pdf">http://www.ryanmcd.com/papers/mg_lda.pdf</a>)</p>
  
  <p>Here I would like to choose a different distribution based on a particular value. 
  For Eg: I would like to do something like</p>
  
  <pre><code>`if ( X[i] &gt; 0.5 )
  {
  Z[i] ~ dcat(theta-gl[D[i], 1:K-gl])
  W[i] ~ dcat(phi-gl[z[i], 1:V])
  }
  else 
  {
  Z[i] ~ dcat(theta-loc[D[i], 1:K-loc])
  W[i] ~ dcat(phi-loc[z[i], 1:V])
  }
  `
  </code></pre>
  
  <p>Is this possible to be done in Winbugs/JAGS?</p>