1
$\begingroup$

This question already has an answer here:

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.

$\endgroup$

marked as duplicate by Tim, kjetil b halvorsen, COOLSerdash, Michael Chernick, Firebug Feb 3 '17 at 11:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

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