Significance and credibility intervals for interaction term in logistic regression I fitted a Bayesian logistic regression in WinBugs and it has an interaction term. Something like this:
$$\mathrm{Prob}(y_{i}=1) = \mathrm{logit}^{-1} (a + b_{1}*x_{i} + b_{2}*w_{i} + b_{3}*x_{i}*w_{i})$$
where $x$ is a standardized continuous variable, and $w$ is a dummy variable.
In reality the model is more complicated, but I wanna keep things simple.
It happens that the interaction term is "significant", but not the single predictors. For instance,
$\mathrm{mean}(b_{1}) = -.2$ and $95%$ quantile: $(-1.3$ and $.7)$
$\mathrm{mean}(b_{2}) = -.4$ and $95%$ quantile: $(-1.3$ and $.5)$
$\mathrm{mean}(b_{3}) = 1.4$ and $95%$ quantile: $(.4$ and $2.5)$
Do you guys have any advice on how to react to this finding? I thought that I could compute 95% credibility intervals for the whole effect of $x$ when $w=1$. This would be:
95% quantile for total effect of x, conditional on $w=1$: $(-1.3+.4$ and $.7+2.5) = (-.9 + 3.2)$
Is this correct? If not, what should I do?
Any references on the subject?
 A: No, your calculation isn't correct, because:
a) $b_1$ and $b_3$ are probably correlated in the posterior distribution, and
b) even if they weren't, that isn't how you would calculate it (think of the law of large numbers).
But never fear, there is a really easy way to do this in WinBUGS. Just define a new variable:
b1b3 <- b1 + b3
and monitor its values. 
EDIT:
For a better explanation of my first point, suppose the posterior has a joint multivariate normal distribution (it won't in this case, but it serves as a useful illustration). Then the parameter $b_i$ has distribution $N(\mu_i,\sigma_i^2)$, and so the 95% credible interval is $(\mu_i - 1.96 \sigma_i,\mu_i + 1.96 \sigma_i)$ - note that this only depends on the mean and variance.
Now $b_1+b_3$ will have distribution $N(\mu_1 + \mu_3,\sigma_1^2 + 2 \rho_{13}\sigma_1\sigma_3 + \sigma_3^2)$. Note that the variance term (and hence the 95% credible interval) involves the correlation term $\rho_{13}$ which cannot be found from the intervals for $b_1$ or $b_3$.
(My point about the law of large numbers was just that the standard deviations of the sum of 2 independent random variables is less than the sum of the standard deviations.)
As for how to implement it in WinBUGS, something like this is what I had in mind:
model {
  a ~ dXXXX
  b1 ~ dXXXX
  b2 ~ dXXXX
  b3 ~ dXXXX
  b1b3 <- b1 + b3

  for (i in 1:N) {
    logit(p[i]) <- a + b1*x[i] + b2*w[i] + b3*x[i]*w[i]
    y[i] ~ dbern(p[i])
  }
}

At each step of the sampler, the node b1b3 will be updated from b1 and b3. It doesn't need a prior as it is just a deterministic function of two other nodes.
A: A few thoughts:
1) I'm not sure whether the fact that this is Bayesian matters. 
2) I think your approach is correct
3) Interactions in logistic regression are tricky. I wrote about this in a paper that is about SAS PROC LOGISTIC, but the general idea holds.  That paper is on my blog and is available here
A: I'm currently having a similar problem. I also believe that the approach to calculate the total effect of w is correct. I believe this can be tested via
h0: b2 + b3 * mean(x) = 0;
ha: b2 + b3 * mean(x) != 0
However, I stumbled upon a paper by Ai/Norton, who claim that "the magnitude of the interaction effet in nonlinear models does not equal the marginal effect of the interaction term, can be of opposite sign, and its statistical significance is not calculated by standard software." (2003, p. 123)
So perhaps you should try to apply their formulas. (And if you understand how to do that, please tell me.)
PS. This seems to resemble the chow-test for logistic regressions. Alfred DeMaris (2004, p. 283) describes a test for this. 
References:
Ai, Chunrong / Norton, Edward (2003): Interaction terms in logit and probit models, Economic Letters 80, p. 123–129
DeMaris, Alfred (2004): Regression with social data: modeling continuous and limited response variables. John Wiley & Sons, Inc., Hoboken NJ
