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?
lm(y~x+I(x^2)+x:z)
wherez
's a factor, R would use reference level coding forz
- two coefficients. Even then it'd be a strange model, in which the category of $Z$ is constrained to make no difference at all when $X=0$. So perhaps the OP means us to understand something like R'sx*z
, which in a formula automatically includes the lower order terms as well as the interaction. Mathematical notation & computer code are each pretty clear - anything else, or in between, leaves us guessing. $\endgroup$