Interpreting logistic regression with an interaction and a quadratic term? I have a logistic regression model that contains a continuous independent variable X, a dependent variable Y, a independent, categorical variable Z with 3 categories A, B, and C.  
The model is essentially:
$Y = \beta_0 +\beta_1X+\beta_2X^2+\beta_3XZ $.
I understand that if the model didn't have the interaction terms, that a 1 unit increase in X is associated with a $\exp(\beta_1)$ change in the odds of y.  In fact, I would often say something like "A 10 unit increase in X is associated with a $\exp(10\beta_1)$ increase in the odds of $Y$.  But how would I say this or interpret this now that there is a quadratic term in my model?  It wouldn't make sense to say a 10 unit change in $X$ is associated with a $\exp(10\beta_1)$ in the odds of $Y$ now, since it depends on the value of $X$, right?   Is it even possible to say something like this now, since the odds change depending on the value of X?
 A: The only model that would really make sense is 
$$Y = \beta_{0} + \beta_{1}X + \beta_{2}X^{2} + \beta_{3}(Z=b) + \beta_{4}(Z=c) + \beta_{5}X(Z=b) + \beta_{6}X(Z=c) + \beta_{7}X^{2}(Z=b) + \beta_{8}X^{2}(Z=c)$$
where $(Z=k)$ denotes 1 if $Z=k$ and 0 otherwise.
In this model the test for interaction is $H_{0}: \beta_{5}\dots \beta_{8} = 0$.
The $X$-effect depends on $Z$ and on the starting point for $X$ since $X$ is nonlinear.  To get the effect of $X$ going from $u$ to $v$ when $Z=k$ write down the special case of the above formula when $X=v, Z=k$ then evaluate it when $X=u, Z=k$ and subtract term by term.  What is left is the formula for that $X$ effect at $Z=k$ which you estimate by plugging in the the $\beta$ estimates from the model fit.  Anti-log and you have the odds ratio.   When $k=a$ the result is $\beta_{2}(v^{2} - u^{2}) + \beta_{1}(v - u)$.
Note that it is not common that $v-u = 1$, i.e., to get a meaningful $X$ effect you might use the quartiles of $X$ and not assume that a 1-unit change is that meaningful for the scale of $X$.
Note also that there is no such thing as the $X$ effect when $Z$ is not set.
Using the R rms package one can get any contrast of interest easily.  To get the above use this example for comparing 30 year olds with 20 year olds for the first race group, where race has 3 categories a, b, c:
require(rms)
f <- lrm(y ~ pol(age, 2) * race) # quadratic with interaction
contrast(f, list(age=30, race='a'),
            list(age=20, race='a'))

