ordinal or interval scale (dummy?)

Hi guys,
I got a question about how to deal with my variables for my uni project. I am doing a multiple regression and I got an independent and a dependent variable (both interval scale). To make my model better I control on several confounder variables and one of them is firm size (measured: 1, 2-5, 6-50, 51 or more employees). So basically this means it is on an ordinal scale and hence I learned I would need to make it as a dummy variable, which in return only allows statements compared to the base level and not about my independent variable and which creates a lot of variables to my model. Is it possible/allowed to use this variable (firm size) just as an interval scaled variable or a better way of dealing with this variable?
Thank you so much for your help!

Best Katharina and Michael

You should convert the ordinal variable in to a factor, so that they are in the right order. The other approaches could work too. There is a lot of detail here: https://stats.stackexchange.com/questions/497524/how-to-use-ordinal-data-as-explanatory-variables-in-ols

1 Like

Hi Williaml thank you very much!
this works
regression <- lm(dependentvariable ~ independentv + morevariables + morevariables + factor(variable), data = my.data)
but do you have any clue if I want to make my the third factor to my basecategory since R always chooses the first?

You can relevel the factors using forcats:

or using base R:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.