Docsity

Using 0-1 Indicator Variables in Regression to Represent Qualitative Variables - Prof. Jos, Study notes of Statistics

Toggle sidebar
bg1
Statistics 3115/5315
Handout 12
Indicator (Dummy) Variables in Regression
So far we have utilized quantitative independent variables in regression
models. Sometimes qualitative independent variables are used. Examples of
qualitative variables are: gender of respondent (female, male), job location
of an employee (plant, o¢ ce, …eld), season of year (winter,spring, summer,
autumn) and type of location for a restaurant (shopping mall, street, high-
way).
Representation of Qualitative Variables.
A qualitative variable can be represented by means of 0;1indicator vari-
ables. A 0;1indicator (dummy) variable is a variable that can have only two
possible values: 0or 1.
A qualitative variable with kclasses or categories is represented by k1
indicator variables.
Examples:
1. The independent variables gender of respondent (female, male) requires
one indicator variable to represent it in a regression model. We denote this
indicator variable by X1and de…ne it as follows:
X1=1if female
0otherwise.
Hence, the numerical values of X1are associated with the two classes of the
variable gender as follows:
Class X1
Male (reference class) 0
Female 1
The …rst class is called the reference class since all the indicator variables
1
pf2

Partial preview of the text

Download Using 0-1 Indicator Variables in Regression to Represent Qualitative Variables - Prof. Jos and more Study notes Statistics in PDF only on Docsity!

Statistics 3115/ Handout 12

Indicator (Dummy) Variables in Regression

So far we have utilized quantitative independent variables in regression models. Sometimes qualitative independent variables are used. Examples of qualitative variables are: gender of respondent (female, male), job location of an employee (plant, o¢ ce, Öeld), season of year (winter,spring, summer, autumn) and type of location for a restaurant (shopping mall, street, high- way).

Representation of Qualitative Variables. A qualitative variable can be represented by means of 0 ; 1 indicator vari- ables. A 0 ; 1 indicator (dummy) variable is a variable that can have only two possible values: 0 or 1.

A qualitative variable with k classes or categories is represented by k 1 indicator variables.

Examples:

  1. The independent variables gender of respondent (female, male) requires one indicator variable to represent it in a regression model. We denote this indicator variable by X 1 and deÖne it as follows:

X 1 =

1 if female 0 otherwise.

Hence, the numerical values of X 1 are associated with the two classes of the

variable gender as follows:

Class X 1 Male (reference class) 0 Female 1

The Örst class is called the reference class since all the indicator variables

identifying this class are set to be equal to 0.

  1. The independent variable location for a restaurant (shopping mall, street, highway) requires k 1 = 3 1 = 2 indicator variables to represent it in a regression model. We denote this variables by X 2 and X 3 and deÖne them as follows.

X 2 =

1 if shopping mall location 0 otherwise

X 3 =

1 if street location 0 otherwise.

Hence, the numerical values of X 2 and X 3 are associated with the three locations as follows:

Class X 2 X 3 Highway (reference class) 0 0 Shopping mall 1 0 Street 0 1