3
$\begingroup$

Just as a trivial example:

I have a sample of 25 children and I have gathered some information example: weight, age etc - to use as predictors.

Now, I don't have the height of the children, but I have an ordinal variable with the shortest child having a value of 1 and tallest child having the value of 25 - "classification wrt height" variable

If I wish to build a regression model, with the "classification wrt height" variable as the response variable, shall I consider it as ordinal or continuous integer variable please (to select the type of regression needed to be applied accordingly)?

Thank you!

$\endgroup$
3
$\begingroup$

Think carefully before you do this. You have no idea what the underlying height distribution is. Here are four possibilities.

Four different sets of simulated height data

If you were building a regression model, each of these sets of height data would be interpreted differently. However, if replaced by your ordinal variable, they all look numerically equivalent. If you use this variable as a continuous variable, you are assuming a level of precision and information not present in the data.

Keep your ordinal variable as an ordinal variable. It may even be advantageous to bin this variable into fewer categories (for example "low", "low-middle", "middle", "middle-high", "high"). There are two reasons to do this.

  1. This is a variable that has a unique value for each observation, which may lead to it looking disproportionately important. When you bin it like this, you remove that problem.
  2. Think about future data that your model will be used to evaluate. Will those height classes in the new data reference the original classes? What if the new set has 100 observations? Now the new data has a range larger than what the model originally considered. Binning this variable is equivalent to normalizing a continuous variable.

Ultimately, your choice should be based on the performance of your regression model. If it behaves better with the variable as a continuous numerical variable, then do that. If the model behaves better with the variable as an ordinal variable in bins, do that.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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