Skip to main content
added 91 characters in body
Source Link
wcampbell
  • 2.2k
  • 1
  • 19
  • 20

You have two options for including this variable in the regression:

  1. Just use the variable as it is, no dummy variable coding. People do this all the time with 5 point Likert scales. This method assumes that moving from 0 to 1 has the same effect as moving from 1 to 2 and from 2 to 3. You may not want to make this assumption.

  2. Use the as.factor function in R to code the variable into three dummy variables relative to the base case (0). You no longer have to assume that the marginal effect of increasing by one level is constant.

The more levels you have in your ordinal variable, the more option 1 would be preferred over option 2 - at some point you have more dummy variables than you want to deal with and interpret. 

I don't think there is a way to "force" an independent variable to be ordinal.

You have two options for including this variable in the regression:

  1. Just use the variable as it is, no dummy variable coding. People do this all the time with 5 point Likert scales. This method assumes that moving from 0 to 1 has the same effect as moving from 1 to 2 and from 2 to 3. You may not want to make this assumption.

  2. Use the as.factor function in R to code the variable into three dummy variables relative to the base case (0). You no longer have to assume that the marginal effect of increasing by one level is constant.

The more levels you have in your ordinal variable, the more option 1 would be preferred over option 2. I don't think there is a way to "force" an independent variable to be ordinal.

You have two options for including this variable in the regression:

  1. Just use the variable as it is, no dummy variable coding. People do this all the time with 5 point Likert scales. This method assumes that moving from 0 to 1 has the same effect as moving from 1 to 2 and from 2 to 3. You may not want to make this assumption.

  2. Use the as.factor function in R to code the variable into three dummy variables relative to the base case (0). You no longer have to assume that the marginal effect of increasing by one level is constant.

The more levels you have in your ordinal variable, the more option 1 would be preferred over option 2 - at some point you have more dummy variables than you want to deal with and interpret. 

I don't think there is a way to "force" an independent variable to be ordinal.

Source Link
wcampbell
  • 2.2k
  • 1
  • 19
  • 20

You have two options for including this variable in the regression:

  1. Just use the variable as it is, no dummy variable coding. People do this all the time with 5 point Likert scales. This method assumes that moving from 0 to 1 has the same effect as moving from 1 to 2 and from 2 to 3. You may not want to make this assumption.

  2. Use the as.factor function in R to code the variable into three dummy variables relative to the base case (0). You no longer have to assume that the marginal effect of increasing by one level is constant.

The more levels you have in your ordinal variable, the more option 1 would be preferred over option 2. I don't think there is a way to "force" an independent variable to be ordinal.