What analyses can be used to find an interaction effect in a 2-factor design, with one ordinal and one categorical factor, with binary-valued data?

Specifically, are there any types of analyses that are capable of dealing with a 2 factor design 5(ordinal) x 2(categorical), where the outcomes are either true or false?

One could do a 5x2 chi square analysis, but it loses the power of the ordinality of the one factor.

Alternatively, one could run independent logistic/probit regressions, but then there is the question of testing for the interaction effect.

Any thoughts or suggestions that would put me in the right direction would be helpful.

  • 2
    $\begingroup$ The estimation is the same for ordinal "X" categorical variables as simple categorical ones - the interpretation is different though. The fact that they are ordinal categories (a,b,c,d,e) simply tell you that a<b<c<d<e and you would need some structure saying in some way "how much" bigger each category is compared to the ones below it. If you want to save a few degrees of freedom, then you would need to specify some additional structure saying how the ordering happens using 3 parameters or less. $\endgroup$ Jan 16, 2011 at 12:34

1 Answer 1


I'd stick with logistic or probit regression, enter both factors as covariates, but enter the ordinal factor as if it was continuous. To test for interaction, do a likelihood-ratio test comparing models with and without an interaction between the two factors. This test will have a single degree of freedom and therefore retain good power.

After using this to decide whether or not you want to include an interaction between the two factors, you can then move on to decide how best to code the 5-level factor in your final model. It could make sense to keep treating it as if it were continuous, or you might wish to code it as four dummy (indicator) variables, or you choose to collapse it into fewer levels, or use some other type of contrast. The choice probably depends on the scientific meaning of the model and its intended use, as well as the fit of the various models.

  • 1
    $\begingroup$ I would slightly disagree with onestop's advice, prefering to leave the ordinal variable as a categorical variable, and then check how the co-efficients vary as you move up the ordinal categories for some structure. To fit the data as if it was continuous means you have to chose numerical values for the categories, and the results could easily be sensitive to this choice - example if I have 1,2,3,4,5 it gives the same ordering as -20,0,50,1000,1000000 - and there is no obvious way to chose between them prior to observing the data. $\endgroup$ Jan 16, 2011 at 13:54
  • 1
    $\begingroup$ The problem with leaving it as categorical is that you'll get a test with 4df that will have less power. In epidemiology it's common to perform a 'test for trend' by treating an ordinal covariate as continuous, but then to report the estimates and CIs for the model with it categorical. $\endgroup$
    – onestop
    Jan 16, 2011 at 14:07
  • $\begingroup$ It happens that the ordinal variable is a series of equidistant samples on a continuous dimension, so it is ok to treat it as a continuous variable. I didn't include that information because I didn't want to bias responses to thinking only of continuous variables, but this should work. Thanks! $\endgroup$
    – mpacer
    Jan 16, 2011 at 23:44
  • $\begingroup$ I would respond to the 4df having less power as a direct consequence of making the weaker assumption of ordinal categories. Without any additional information on how far each category is from the other, one is effectively replacing degrees of freedom with assumptions (which are somewhat arbitrary without more info), and thus leaving the results open to model misspecification (i.e. choosing the wrong set of numbers to label the categories). $\endgroup$ Jan 18, 2011 at 12:57
  • $\begingroup$ Additionally, since the interaction has the additional parameter, technically rather than a simple Likelihood-ratio test, shouldn't some information criterion (AIC, BIC, etc.) be used? $\endgroup$
    – mpacer
    Feb 5, 2011 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.