There are several techniques for capturing certain scenarios in your data file. Statistical analysis is not always focused on a measurement directly. There are times when you just want to see if a value meets a particular cut-off. So you assign a ‘1’ for cases that meet your criteria. Any values that do not meet the cut-off would be assigned a ‘0’ value. The technique of assigning 1’s or 0’s would be captures in a new variable, your dummy variable. Your dummy variable is meaningless without your cut-off definitions. We see a lot of dummy variables in logistic regression techniques. For example, let’s look at the variable age. Now suppose you only want to see if the age is more than 40. So you create a dummy variable that becomes a ‘0’ if age is less than 40 and a ‘1’ if age is greater than 40. So your data would look like this…

Age flag

25 0

35 0

50 1

65 1

So you have two cases where the dummy variable, flag, is equal to 1. And that’s how you make a dummy variable.

If you enjoyed this blog there are more to follow.

-Amy

### Like this:

Like Loading...

## Leave a Reply