+ All Categories
Home > Documents > Notes from Lecture 15

Notes from Lecture 15

Date post: 02-Jan-2017
Category:
Upload: hoangkien
View: 214 times
Download: 0 times
Share this document with a friend
17
No class next Thursday. Homework #4 due Friday, March 7 th . Homework #5 will be posted soon, and is due Friday, March 14 th .
Transcript
Page 1: Notes from Lecture 15

No class next

Thursday.

Homework #4 due Friday, March 7th.

Homework #5 will be posted soon,

and is due Friday, March 14th.

Page 2: Notes from Lecture 15

Political Science 15

Lecture 15:

Dummy Variables

Page 3: Notes from Lecture 15

Nominal Level Variables as

Independent Variables

Recall that nominal level variables only tell us

that observations fall into different unordered

categories.

Unlike ratio, interval, or ordinal variables, a “1-

unit change” doesn’t have any meaning.

How can we use nominal level variables as

independent variables in a regression?

Page 4: Notes from Lecture 15

Coding of Nominal Variables

Example: A variable measuring gender:

Men = 1

Women = 2

Example: A variable measuring race:

White = 1

Black = 2

Latino = 3

Asian = 4

Other = 5

Page 5: Notes from Lecture 15

Dummy Variables

To use nominal level variables in a regression, we must recode them into a set of dummy variables.

Dummy variables are coded 0 if an observation does not fall into a specific category, and 1 if it does fall into that category.

After this recoding a 1-unit change will make sense -- it is the difference between being in and out of that category.

Page 6: Notes from Lecture 15

Examples of Dummy Variables

Gender:

Women dummy variable (1 if woman, 0 if man)

Race:

White dummy variable (1 if White, 0 otherwise)

Black dummy variable (1 if Black, 0 otherwise)

Latino dummy variable (1 if Latino, 0 otherwise)

Asian dummy variable (1 if Asian, 0 otherwise)

One group in our data is the baseline category. All dummy variables measure the difference from the baseline category.

Page 7: Notes from Lecture 15

Dummy Variables in Regression

Consider the regression:

y = a + b*x + c*m

where y = campaign contributions in $, x =

years of education, and m is a dummy variable

for minority (0 for white, 1 for minority).

The regression line for whites: a + b*x

The regression line for minorities: (a + c) + b*x

The dummy variable adjusts the constant term.

Page 8: Notes from Lecture 15

Example: Regression Ignoring

Differences Between Groups

circles = white, squares = minority

Page 9: Notes from Lecture 15

Example: Regression with Dummy

Variable Distinguishing Groups

Intercept for whites = a

Intercept for minorities = a + c

Page 10: Notes from Lecture 15

Example: Dummy Variable in a

Quasi-Experiment

We want to test whether installing a traffic roundabout reduced traffic accidents.

Page 11: Notes from Lecture 15

Example: Dummy Variable in a

Quasi-Experiment

Specify a dummy variable separating the two time periods.

Page 12: Notes from Lecture 15

Example of Regression with

Dummy Variables in SPSS

Page 13: Notes from Lecture 15

Example of Regression with

Dummy Variables in a

Journal Article

Page 14: Notes from Lecture 15

Dummy Variables in Regression,

More than 2 Groups

Consider the regression:

y = a + b*x + c*m1 + d*m2

where y = campaign contributions in $, x =

years of education, m1 is a dummy variable for

black, and m2 is a dummy variable for latino.

The regression line for white: a + b*x

The regression line for black: (a + c) + b*x

The regression line for latino: (a + d) + b*x.

Page 15: Notes from Lecture 15

Example: Regression with Dummy

Variable Distinguishing 3 Groups

Intercept for white = a, intercept for black = (a+c), intercept for latino = (a + d).

Page 16: Notes from Lecture 15

Dummy Variables in Regression,

Two Dummy Variables

Consider the regression:

y = a + b*x + c*m + d*g

where y = campaign contributions in $, x = years of education, m is a dummy variable for minority, and g is a dummy variable for women.

The regression line for white male: a + b*x

The regression line for minority male: (a + c) + b*x

The regression line for white female: (a + d) + b*x.

The regression line for minority female: (a + c + d) + b*x

Page 17: Notes from Lecture 15

Example: Regression with Two

Dummy Variables

Intercept for white male = a, intercept for minority

male = (a+c), intercept for white female = (a + d),

intercept for minority female = (a + c + d).


Recommended