# Probabilty Scale Versus Log Odds - Interaction Effect Size

I am looking at doing some power analysis for a simple full factorial design using logistic regression as the method of analysis 2 main effects and their interaction. I am trying to discern the magnitude of the interaction through postulated probabilities.

Specifically I have the following factors A and B, each with a low (-1) and high (1) level. Given a balanced experiment I believe I can average over the other level for the main effects and calculate the main effect of A as 0.11% and the main effect of B as 0.0934%. Slicing the simple effects of A I calculate the interaction as -0.08%.

I am therefore thinking with the power analysis I should have almost as much power for the interaction term as the other main effects, especially B. It works out that the interaction term is tiny through the logistic regression.

Is there any way to tell just from the probabilities if the interaction is "large" or "small"?

> x_df<-data.frame(A=c(-1,-1,1,1),B=c(-1,1,-1,1))
> x_df
A  B
1 -1 -1
2 -1  1
3  1 -1
4  1  1
> X<-matrix(c(12,9988,5,9995,25,9975,10,9990),nrow = 4,ncol = 2,byrow = TRUE)
> X
[,1] [,2]
[1,]   12 9988
[2,]    5 9995
[3,]   25 9975
[4,]   10 9990
> summary(glm(X~x_df$A+x_df$B+x_df$A*x_df$B, family = binomial))

Call:
glm(formula = X ~ x_df$A + x_df$B + x_df$A * x_df$B, family = binomial)

Deviance Residuals:
[1]  0  0  0  0

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)   -6.80509    0.16274 -41.817  < 2e-16 ***
x_df$A 0.35723 0.16274 2.195 0.02815 * x_df$B        -0.44849    0.16274  -2.756  0.00585 **
x_df$A:x_df$B -0.01041    0.16274  -0.064  0.94901
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 1.5995e+01  on 3  degrees of freedom
Residual deviance: 7.0046e-12  on 0  degrees of freedom
AIC: 25.033

Number of Fisher Scoring iterations: 3


There is a general rule of thumb: If you calculated a sample size of $n$ to test for the main effect, you'll need $4n$ for the interaction of the same magnitude and at the same power. See Leon and Heo (CSDA, 2009). This applies to logistic regression as well. It can be worse for poorly balanced data.