2

Is it possible for dummy variables in a regression model to take on any value. I added a variable to my model with two variables (one dependent and one independent) and called it a dummy variable that can take on any Integer value > 0. This value also give me some information about my observations. But i was told i cannot call it a dummy variable as it is does not take on a binary value.

I did read some articles and got some definitions, but i can't seem to find an example of a dummy variable that can take on any value. I just want to confirm that a dummy variable can only be binary.

Jason Samuels
  • 791
  • 3
  • 10
  • 21
  • 4
    Possible duplicate of [Why is gender typically coded 0/1 rather than 1/2, for example?](http://stats.stackexchange.com/questions/16689/why-is-gender-typically-coded-0-1-rather-than-1-2-for-example) see also http://stats.stackexchange.com/questions/203993/why-0-for-failure-and-1-for-success-in-a-bernoulli-distribution/204007#204007 – Tim Feb 03 '17 at 08:18

2 Answers2

3

Indeed, a dummy variable can take values either 1 or 0. It can express either a binary variable (for instance, man/woman, and it's on you to decide which gender you encode to be 1 and which to be 0), or a categorical variables (for instance, level of education: basic/college/postgraduate).

In the case of categorical data, you need one dummy (binary) variable for each category: basic=1 if the person has only completed basic education, 0 otherwise, college=1 if the person has only completed college education, 0 otherwise; postgraduate=1 if the person has completed postgraduate education, 0 otherwise. Then, because they are perfectly multicollinear (knowing the value of two of the variables for an individual uniquely determines the third of them - for instance, an individual with neither college nor postgraduate sure has basic education), you drop one of them in the regression, that will serve as the base category.

Anna SdTC
  • 842
  • 4
  • 10
1

As far as I know, the most common kind of dummy variables is as you described: A binary variable that can only take on 0 or 1. Wiki

My statistics professor used to call a variable with effect coding (-1,0,1) a dummy variable, but he is the only one I know, who did that.

What you have created is a categorical variable. Wiki What you can do, is break down the categorical variable into single dummy variables, where one category is indicated by one dummy variable.