# Testing if treating a categorical variable as continuous is okay

Pardon me if this is a simple question, but I haven't found a great resource for this just yet.

Yes, I know that when possible, we should try to treat ordinal variables as categorical rather than continuous, but I have a particular application where being able to interpret the ordinal variable (parental education) as interval would be really, really convenient.

Pasta (2009) (bottom of page 5) uses the following to show that the deviations from nonlinearity of an ordinal variable are insignificant: You run models (in this case, OLS) of the outcome variable on the ordinal variable of interest. In this model, you include BOTH the version of the variable as continuous the version as categorical. The t-tests from this model on the categorical levels output from statistical software will give you a general idea if the nonlinearity is significant.

I don't know how convincing that is seeing as the model drops two levels for collinearity reasons, so I was wondering if the following might work instead: You do the same, except you run separate models for each level of the categorical variables.

So for example, you have the outcome variable y and an ordinal independent variable x, with 4 levels. As such, the categorical version of x is x.cat, and the 4 level dummies are x.1, x.2, x.3, and x.4. You then run 4 models:

• y ~ x.cat+x.1
• y ~ x.cat+x.2
• y ~ x.cat+x.3
• y ~ x.cat+x.4

Could you then use these t-statistics on the dummies in each model to determine the extent to which nonlinearity is significant?

Any feedback would be greatly appreciated.

• The question is interesting and potentially is good. But the very title nonlinearity of ordinal variable is itself a confusion. To be able to form linear or nonlinear association variables must be already assumed scale ones, equal or nonequal interval. Commented Sep 22, 2013 at 9:04
• Thanks, I will try to edit the title and see if that gets me some answers. Commented Sep 22, 2013 at 15:24
• Can't you just include your ordered predictor, as well as orthogonal (1-DF) contrasts to test for linear or quadratic trend?
– chl
Commented Sep 23, 2013 at 19:38
• ...Sorry, that last part is a bit over my head. Do you have a resource I could go to in order to learn that? Commented Sep 24, 2013 at 4:05