How to add an interaction term in JAGS? I'm trying to add an interaction term to a JAGS model. I found this where it shows some interaction terms. But I don't understand what's the guide lines to create an interaction term, which is different than what's proposed here. 
I have this code: 
   for(ind in 1:nind) { ## nind = nrow(d$X)
      for(yr in 1:nyear) {
        logit(phi[ind,yr]) <-
          phi.sp[species[ind]] + ## effect of species 
            phi.year[yr] + ## effect of year
               phi.pc1[species[ind]]*pc1[ind] + ## Effect of morphology, but only the PCA scores
               phi.pc2[species[ind]]*pc2[ind]
of individuals captured)
        } ## (yr in 1:nyear)

I want to add an interaction between PC1 and PC2. How should I do this?
PC1_2 * pc1[ind] * pc2[ind]
PC1_2 ~ dnorm(0, 0.01) # I want it to be a fixed factor

And put these here: 
for(ind in 1:nind) { ## nind = nrow(d$X)
      for(yr in 1:nyear) {
        logit(phi[ind,yr]) <-
          phi.sp[species[ind]] + ## effect of species 
            phi.year[yr] + ## effect of year
               phi.pc1[species[ind]]*pc1[ind] + ## Effect of morphology, but only the PCA scores
               phi.pc2[species[ind]]*pc2[ind] + 
               PC1_2 * pc1[ind] * pc2[ind]
of individuals captured)
        } ## (yr in 1:year)

Is that correct?
Also, is it a good idea to add an interaction between PC axes? Since a scaling 2 would preserve a Mahalanobis distance and focus on correlation between axis and vectors, what would an interaction between a PC1 and PC2 tell?
 A: If you want a coefficient of an interaction term that is common to species and years, your code is correct. I don't have much experience of principal component analysis, so I can't answer the latter part of your question, sorry.
Here is my example (for rjags);
# I supposed that your data was like this.
#   yr2001 yr2002 yr2003 yr2004 yr2005 ... ind species ...       pc1         pc2 
# 1 Y[1,1] Y[1,2] Y[1,3] Y[1,4] Y[1,5] ...   1       1 ... 0.2543029  0.32230799   
# 2 Y[2,1] Y[2,2] Y[2,3] Y[2,4] Y[2,5] ...   2       2 ... 0.2219234 -0.38741117   
:

model
{

  for(ind in 1:nind) {                   ## nind = nrow(d$X)
    for(yr in 1:nyear) {
      Y[ind, yr] ~ dbin(phi[ind, yr], 12)
      logit(phi[ind,yr]) <-
        phi.sp[species[ind]] +           ## effect of species 
        phi.year[yr] +                   ## effect of year
        phi.pc1[species[ind]]*pc1[ind] + ## Effect of morphology, but only the PCA scores
        phi.pc2[species[ind]]*pc2[ind] + ##  of individuals captured)
        PC1_2 * pc1[ind] * pc2[ind]
    } ## (yr in 1:year)
  } ## (ind in 1:nind)

  for(sp in 1:nspecies){               ## Prior
    phi.sp[sp] ~ dnorm(0, 0.01)
    phi.pc1[sp] ~ dnorm(0, 0.01)
    phi.pc2[sp] ~ dnorm(0, 0.01)
  } ## (sp in 1:nspecies)

  for(yr in 1:nyear){                  ## Prior
    phi.year[yr] ~ dnorm(0, 0.01)
  } ## (yr in 1:nyear)

  PC1_2 ~ dnorm(0, 0.01)               ## Prior

} ## (end)

