## What is a Dummy Variable

A ** dummy variable** is commonly used in statistics and econometrics and regression analysis. This indicator variable takes on the value of 1 or 0 to indicate the availability or lack of some effect that would change the outcome of whatever is being tested. Commonly used uses for a

*dummy variable*includes demonstrating the presence or lack of a war in any given period, a major weather event such as a hurricane or even a strike.

## What is a Dummy Variable

Since regression models are quantitative by nature, *dummy variables* play an important role in expressing some qualitative facts. Dependent variables in models are not only impacted by quantitative variables, but also are impacted by qualitative variables such as religions, gender, color, and geography. The **Dummy Variable** accounts for such variables by marking the presence of the impacting variable with a value of 1 and the lack of the tested variable with a value of 0.

A **dummy variable** with a value of 0 will lead to the variable’s coefficient to go away while a value of 1 will cause the coefficient to act as an intercept in the model. With such ease of setting up and the obvious reasons for supporting the usage, *dummy variables* are now commonly used in economic forecasting and time series analysis.

Let’s say that Wages are being tested as the dependent variable and wage is a function of gender and education. Where:

**Wage = α _{0} + δ_{0}female + α_{1}education + e**

** **Female is 1 while Male is 0

δ_{0} is the the difference in wages between males and females.

When dealing with *dummy variables*, it is important not to fall into what is known as the** dummy variable** trap. In certain circumstances, perfect multicollinearity can occur, messing up the model.

Models can also of course have more than one **dummy variable** In a similar model, perhaps race is a considered variable.

**Y _{i} = β_{1} + β_{2}D_{2} + β_{3}D_{3} + αX_{i} + U_{i}**

y = wages

x = education years

D2 = gender ( 1 if female, 0 if male)

D3 = Race ( 1 if not white, 0 if white)

Dummy Variables can also be used as the dependent variable. Commonly tested situations could include a political party affiliation, retirement, promotions at work, or what to study in college.

## How to Create Dummy Variables in E-views

Creating **dummy variables** is fairly simple in E-Views and can be done the same way that other variables are created.

Upon creating a new variable, double click it to open up the series. Then you can click and select cells in the columns and click “Edit +/-“. This will allow you to input your own data where you can input 1 or 0 to set up your variable as a **dummy variable**.

**Share this post!**