Should an ordinal variable in an interaction be treated as categorical or continuous? I have an ordinal categorical variable (A, with 3 categories). There are 2 ways to include it in a regression model: 1) as a factor or as 2) a continuous variable.
I am interested in modeling the interaction of this variable with another continuous variable (B). Including it as a continuous variable results in a significant interaction between A and B (Y ~ A + B + A*B gives P(A*B)=0.001), but including it as an ordinal variable results in less significant interaction terms (Y ~ A.1 + A.2 + B + A.1*B + A.2*B yields P(A.1*B)=0.01;  P(A.2*B)=0.1). Purely looking at these p-values, it seems like the continuous form has a better fit and is simpler.
What are general principles to decide which interaction is the better fit? Is there a statistical way to compare the 1 term version with the 2 term version? How do you decide whether to use a more complicated model over a simpler model?  (R or Stata code may be helpful.)
 A: This isn't really different from the question of whether to model an ordinal variable as continuous vs. categorical outside of an interaction.  There have been various discussions on CV about this topic (I found some1 by searching on the ordinal tag, sorting by votes, and briefly skimming some of the top threads).  The information in those discussions applies here as well.  You would do well to read some of the existing threads and consider how the points made play out in your situation.
To provide a somewhat more specific response to your question, I would like to address two claims made in the body of the post: 1) the p-values make "it seem like the continuous form has a better fit", and 2) "the continuous form... is simpler".

*

*Using p-values to assess fit is a dicey affair.  (You may benefit by reading some2 threads related to p-values and various kinds of goodness of fit, and thinking abstractly about their underlying similarities.)
Secondly, you can't compare the one p-value from the continuous fit to the pair of p-values from the categorical fit.  To get a more comparable p-value, you would need to conduct a multiple degree of freedom (viz., $2$) test of the interaction from the categorical fit.  This would be a nested model test of the model without the interaction to the full model with it.  Even this wouldn't really be quite comparable, as the zero-order version of A would differ between the continuous model and the categorical model.  An even better set of p-values is to compare nested model tests of both full models against a reduced model that only contains B.  But even then, using p-values to assess goodness of fit remains a dicey affair.
Lastly, it should be obvious that the categorical fit has to be better.  (Whether it's overfit is a different question.)  Whether you want to call A categorical or continuous, the fact remains that you only have $3$ values for A.  That means that there are in fact $3$ lines constituting the set of relationships between B and Y.  The categorical model will fit those three lines explicitly, whereas the continuous version does its best to fit them with $1$ that is changing by equal increments.


*The idea that the continuous version is simpler is an illusion.  Certainly, the model output looks simpler because there are fewer rows in the coefficients table.  But, as noted above, the model is ultimately three lines in both setups; the only difference is how the model 'got to' those lines.  To put it more plainly, the number of rows in the coefficients table is not of intrinsic scientific interest.

  
Related threads:  

*

*For example, Does it ever make sense to treat categorical data as continuous?, Under what conditions should Likert scales be used as ordinal or interval data?, How to handle ordinal categorical variable as independent variable, etc.


*For example, Significance vs. goodness-of-fit in regression, What is null hypothesis in the deviance goodness of fit test for a GLM model?, Is $R^2$ useful or dangerous?, Is normality testing 'essentially useless'? etc.

