<p>In your question you talk about coding so I will address primarily the question of coding.</p>
<p>You should definitely code it using suggested</p>
<blockquote>
<p>0 for a, 1 for b, 2 for c and 3 for d</p>
</blockquote>
<p>regardless of whether you plan to use it as ordinal variable or categorical variable.</p>
<p>Let me explain, nowadays virtually any language or program will have option to easily turn ordinal, or categorical variables into dummies with virtually zero effort.</p>
<p>In <code>R</code> you can simply use is.factor() function to turn any ordinal variable into separate dummies so you could use:</p>
<pre><code>lm( dep_var ~ ind_var + is.factor(variable), data = XY)
</code></pre>
<p>In Stata you can use i.variable to turn any ordinal or categorical variable into dummies, again in Stata you would run something like:</p>
<pre><code>reg depvar independentvar i.variable
</code></pre>
<p>Next, coding it as separate dummies is more time consuming (even if just marginally it takes more line of code) than just coding it into one variable.</p>
<p>Consequently, no matter whether in actual model you want to include it as oridinal variable or set of dummies, in most standard languages and programs it will be more efficient (i.e. take less time to code) if you just code it on Likert scale.</p>
<p>As for whether what you should do from scientific standpoint that depends on details of your research. I can imagine you would be being able to defend both including the variable as independent ordinal scale or as a separate dummies. Both of those would work in principle. My sense is that you would likely want to include it as dummies since that will have better interpretation,  but if you have little data and too many regressors then it might be worth while to just have it as ordinal variable.</p>

CC BY-SA 4.0
2021-02-05T12:41:49.733Z
2021-02-05T16:58:28.320Z
2021-02-05T16:58:28.320Z
1muflon1
<p>I want to run a linear regression based on the data gathered using a questionnaire. Several of the questions have the following form:</p>
<p><strong>How much do you spend on xyz in a month?</strong></p>
<p><em>a. Less than \$50</em></p>
<p><em>b. \$50 to less than \$100</em></p>
<p><em>c. \$100 to less than \$200</em></p>
<p><em>d. \$200 or more</em></p>
<p>This is ordinal data, with multiple categories. I am not sure how to code them.</p>
<p><em><strong>Should I use code them like a Likert scale (though Likert scale data is interval data instead)</strong></em>:</p>
<p>0 for a, 1 for b, 2 for c and 3 for d</p>
<p><em><strong>Or should I use dummy variables like this</strong></em>:</p>
<p>3 dummy variables for options b, c and d, with the respective dummy variable set equal to 1 if the option is chosen and 0 otherwise. All dummy variables are set to 0 if option a is chosen.</p>
<p>In this case I am concerned that all sense of ordinality is lost and I am treating the options just as nominal data. In this case, I think I would not be able to comment on whether the more you spend on xyz, the more you gain weight for example.</p>
<p><em><strong>Which one should be used? Or should some completely different coding be used?</strong></em></p>
<p>I seek to use such variables only as regressors, my regressand is a ratio-scale variable.</p>

<regression><applied-econometrics>
Choice between dummy variables and Likert scale in Linear Regression
Ishan Kashyap Hazarika
# Choice between dummy variables and Likert scale in Linear Regression

(Asked by: username_0 on 2021-02-05)

I want to run a linear regression based on the data gathered using a questionnaire. Several of the questions have the following form:

**How much do you spend on xyz in a month?**

*a. Less than \$50*

*b. \$50 to less than \$100*

*c. \$100 to less than \$200*

*d. \$200 or more*

This is ordinal data, with multiple categories. I am not sure how to code them.

***Should I use code them like a Likert scale (though Likert scale data is interval data instead)***:

0 for a, 1 for b, 2 for c and 3 for d

***Or should I use dummy variables like this***:

3 dummy variables for options b, c and d, with the respective dummy variable set equal to 1 if the option is chosen and 0 otherwise. All dummy variables are set to 0 if option a is chosen.

In this case I am concerned that all sense of ordinality is lost and I am treating the options just as nominal data. In this case, I think I would not be able to comment on whether the more you spend on xyz, the more you gain weight for example.

***Which one should be used? Or should some completely different coding be used?***

I seek to use such variables only as regressors, my regressand is a ratio-scale variable.

**Tags:** regression, applied-econometrics

---

## 1 answers

### Answer by username_1 on 2021-02-05. Score: 4 | Accepted answer

In your question you talk about coding so I will address primarily the question of coding.
You should definitely code it using suggested

0 for a, 1 for b, 2 for c and 3 for d

regardless of whether you plan to use it as ordinal variable or categorical variable.
Let me explain, nowadays virtually any language or program will have option to easily turn ordinal, or categorical variables into dummies with virtually zero effort.
In R you can simply use is.factor() function to turn any ordinal variable into separate dummies so you could use:
lm( dep_var ~ ind_var + is.factor(variable), data = XY)

In Stata you can use i.variable to turn any ordinal or categorical variable into dummies, again in Stata you would run something like:
reg depvar independentvar i.variable

Next, coding it as separate dummies is more time consuming (even if just marginally it takes more line of code) than just coding it into one variable.
Consequently, no matter whether in actual model you want to include it as oridinal variable or set of dummies, in most standard languages and programs it will be more efficient (i.e. take less time to code) if you just code it on Likert scale.
As for whether what you should do from scientific standpoint that depends on details of your research. I can imagine you would be being able to defend both including the variable as independent ordinal scale or as a separate dummies. Both of those would work in principle. My sense is that you would likely want to include it as dummies since that will have better interpretation,  but if you have little data and too many regressors then it might be worth while to just have it as ordinal variable.


---

