title: Nested Random effect in JAGS/ WinBUGS
body: <p>I am interested in fitting the following nested random effect model in JAGS. </p>
  
  <p><strong>SAS code</strong></p>
  
  <pre><code>proc nlmixed data=data1 qpoints=20;
  
      parms beta0=2 beta1=1 ;
      bounds vara &gt;=0, varb_a &gt;=0;
       eta = beta0+ beta1*t+ b2+b3;
      p = exp(eta)/(1+exp(eta));
      model TestResult ~ binary(p);
       random b2 ~ normal(0,vara) subject = HHcode;
       random b3 ~ normal(0,varb_a) subject = IDNo_N(HHcode);
      run;
  </code></pre>
  
  <p><strong>My question</strong>: How to specify the random effect part?<br><br>
  I have repeated measurements on individuals. These individuals are further nested in the household. Note: The number of individuals per household vary!</p>
  
  <p>Looking forward to hearing from you </p>