0% found this document useful (0 votes)
8 views27 pages

DRAFT - 14 Dummy Variables - V3

The document is a lecture outline for Econ 131 - Quantitative Economics, focusing on dummy variables in econometrics. It discusses nested models, the use of logarithms, and the interpretation of dummy variables in regression analysis. Additionally, it covers interactions among dummy variables and their implications in modeling multiple categories and continuous variables.

Uploaded by

angagalac1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views27 pages

DRAFT - 14 Dummy Variables - V3

The document is a lecture outline for Econ 131 - Quantitative Economics, focusing on dummy variables in econometrics. It discusses nested models, the use of logarithms, and the interpretation of dummy variables in regression analysis. Additionally, it covers interactions among dummy variables and their implications in modeling multiple categories and continuous variables.

Uploaded by

angagalac1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Econ 131 – Quantitative Economics

(a.k.a. Introductory Econometrics)


Dummy variables
Instructor: Anthony G. Sabarillo
University of the Philippines School of Economics
Main reference: Wooldridge (2012), Prof. Jandoc’s lecture notes;
Prof. Nimfa Mendoza’s lecture notes

Not for distribution. For lecture purposes only. 1


But first: Some postscripts on topic “13 MLR: Further issues”
(Based on lecture notes of Dr. Nimfa Mendoza)
• Nested and non-nested models:
• Which of the two pairs of equations are nested models?
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝛽𝛽3 𝑥𝑥3 + 𝑢𝑢 These are nested models
� because the variables in one equation
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝑣𝑣 are a subset of those in the other equation.

• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝛽𝛽3 𝑧𝑧1 + 𝑢𝑢


• 𝑦𝑦 = 𝛼𝛼0 + 𝛼𝛼1 𝑥𝑥1 + 𝛼𝛼2 𝑥𝑥2 + 𝛼𝛼3 𝑧𝑧2 + 𝑣𝑣

• Which model should you pick? (Justify your answer):


• 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 = 𝛽𝛽𝛽 + 𝛽𝛽1 log 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑢𝑢, 𝑅𝑅 2 = 0.06, 𝑅𝑅� 2 = 0.03
• 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 = 𝛼𝛼0 + 𝛼𝛼1 𝑠𝑠𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 + 𝛼𝛼2 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 2 + 𝑢𝑢, 𝑅𝑅2 = 0.148, 𝑅𝑅� 2 = 0.09

Not for distribution. For lecture purposes only. 2


But first: Some postscripts on topic “13 MLR: Further issues”
(Based on lecture notes of Dr. Nimfa Mendoza)
• Logarithms might be useful when we want to • Suppose 𝑥𝑥2 changes from 𝑥𝑥2𝜊𝜊 to 𝑥𝑥2′ , and as a
• narrow the range of values of a variable result of this, 𝑦𝑦 changes from 𝑦𝑦 𝜊𝜊 to 𝑦𝑦 ′ :
• Lessen sensitivity to extreme values or �
• log 𝑦𝑦 ′ = 𝛽𝛽̂0 + 𝛽𝛽̂1 𝑥𝑥1𝜊𝜊 + 𝛽𝛽̂2 𝑥𝑥2′ .
outliers
• Hence, log � 𝑦𝑦 ′ − log � 𝑦𝑦 𝜊𝜊

• Recall: Given log 𝑦𝑦 = 𝛽𝛽̂0 + 𝛽𝛽̂1 𝑥𝑥1 + 𝛽𝛽̂2 𝑥𝑥2 ,
= 𝛽𝛽̂0 + 𝛽𝛽̂1 𝑥𝑥1𝜊𝜊 + 𝛽𝛽̂2 𝑥𝑥2′ − 𝛽𝛽̂0 + 𝛽𝛽̂1 𝑥𝑥1𝜊𝜊 + 𝛽𝛽̂2 𝑥𝑥2𝜊𝜊
• an approximation of %Δ�y resulting from Δ𝑥𝑥2 , � � 𝜊𝜊 = 𝛽𝛽̂ (𝑥𝑥 ′ − 𝑥𝑥 𝜊𝜊 )
̂
keeping Δ𝑥𝑥1 = 0, is 100 × 𝛽𝛽2 Δ𝑥𝑥2 % • ⇒ log 𝑦𝑦 ′ − log 𝑦𝑦 2 2 2
𝑦𝑦� ′
• That is, when Δ𝑥𝑥1 = 0, • ⇒ log � 𝜊𝜊 = 𝛽𝛽̂2 Δ𝑥𝑥2 , where 𝑥𝑥2′ − 𝑥𝑥2𝜊𝜊 ≡ Δ𝑥𝑥2 .
𝑦𝑦
�𝑦𝑦 %.
% Δ𝑦𝑦� ≈ 100 × Δ log
𝑦𝑦� ′ �2 Δ𝑥𝑥2
𝛽𝛽
• We can derive the exact %Δ𝑦𝑦� due to Δ𝑥𝑥2 : • ⇒ � 𝜊𝜊
= 𝑒𝑒
𝑦𝑦

• Let the initial values be 𝑥𝑥1𝜊𝜊 , 𝑥𝑥2𝜊𝜊 , 𝑦𝑦 𝜊𝜊 . 𝑦𝑦� ′ � 𝑦𝑦� ′ −𝑦𝑦� 𝜊𝜊 �


• ⇒ −1= 𝑒𝑒 𝛽𝛽2Δ𝑥𝑥2 −1⇒ = 𝑒𝑒 𝛽𝛽2Δ𝑥𝑥2 − 1
� 𝑦𝑦� 𝜊𝜊 𝑦𝑦� 𝜊𝜊
• ⇒ log 𝑦𝑦 𝜊𝜊 = 𝛽𝛽̂0 + 𝛽𝛽̂1 𝑥𝑥1𝜊𝜊 + 𝛽𝛽̂2 𝑥𝑥2𝜊𝜊 .

• Thus, %Δ𝑦𝑦� = 100 × 𝑒𝑒 𝛽𝛽2Δ𝑥𝑥2 − 1

Not for distribution. For lecture purposes only. 3


But first: Some postscripts on topic “13 MLR: Further issues”
(Based on lecture notes of Dr. Nimfa Mendoza) forms
• Some remarks on log forms:
• Suppose the population model is:
• log 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 log 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝑢𝑢
• log 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 = 𝛽𝛽0 + 𝛽𝛽1 log 𝑛𝑛𝑛𝑛𝑛𝑛 + 𝛽𝛽2 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 + 𝑢𝑢
• ⇒ log �
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 = 9.23 + 0.718 log 𝑛𝑛𝑛𝑛𝑛𝑛 + 0.306 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 + 𝑢𝑢
� ↑ by approximately 30.6%.
• Δ𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 = 1 ⇒ 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
�𝑦𝑦 %.
• Recall: when Δ𝑥𝑥1 = 0, % Δ𝑦𝑦� ≈ 100 × Δ log

• As Δ log 𝑦𝑦 becomes larger and larger, the approximation becomes less accurate
• To get the exact % Δ𝑦𝑦� using 𝛽𝛽̂2 (when Δ𝑥𝑥1 = 0), use this formula:

• %Δ𝑦𝑦� = 100 × 𝑒𝑒 𝛽𝛽2 Δ𝑥𝑥2 − 1
• What is %Δ𝑦𝑦� when Δ𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 = 1 and when Δ𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 = −1?

Not for distribution. For lecture purposes only. 4


Outline
• Examine dummy variables, introduce a more formal treatment
• Dummy variables on the right hand side
• Dummy variables on the left-hand side

Not for distribution. For lecture purposes only. 5


Dummy variables
• Dummy variables takes on value 1 or 0
• E.g. 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 1, 0 otherwise; 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 = 1, 0 otherwise
• Also called binary variables

Not for distribution. For lecture purposes only. 6


Dummy variables
• 𝑦𝑦 = 𝛽𝛽0 + 𝛿𝛿0 𝑑𝑑 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢
• Dummy variables can be interpreted as an intercept shift
• If 𝑑𝑑 = 0, then 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢.
• If 𝑑𝑑 = 1, then 𝑦𝑦 = 𝛽𝛽0 + 𝛿𝛿0 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢.
• The case of 𝑑𝑑 = 0 is the base group.

Not for distribution. For lecture purposes only. 7


Dummy variables

Not for distribution. For lecture purposes only. 8


Dummies for Multiple Categories
• We can use dummy variables to control for something with multiple
categories.
• For instance in our wage regression, we can categorize people who have
no dependents, one dependent and more than 1 dependents.
• To compare persons with 1 dependent and 2 or more dependents to no
dependents, include 2 dummy variables.
• Be aware of the dummy variable trap!

Not for distribution. For lecture purposes only. 9


Interactions among dummies
• Interacting dummy variables is like subdividing the group.
• E.g. dummies for female, as well as married.
• Model:
• 𝑦𝑦 = 𝛽𝛽0 + 𝛿𝛿0 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + 𝛿𝛿1 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 + 𝛿𝛿2 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 ∗ 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢
• If 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 0 and 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 = 0: 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢
• If 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 1 and 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 = 0: 𝑦𝑦 = 𝛽𝛽0 + 𝛿𝛿0 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢
• Notice how the dummy caused the intercept to change.

Not for distribution. For lecture purposes only. 10


Other interactions with dummies
• What if we interact a dummy with a continuous variable, 𝑥𝑥?
• 𝑦𝑦 = 𝛽𝛽0 + 𝛿𝛿0 𝑑𝑑 + 𝛽𝛽1 𝑥𝑥 + 𝛿𝛿1 𝑑𝑑 ∗ 𝑥𝑥 + 𝑢𝑢
• If 𝑑𝑑 = 0, then 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥 + 𝑢𝑢.
• If 𝑑𝑑 = 1, then 𝑦𝑦 = 𝛽𝛽0 + 𝛿𝛿0 + (𝛽𝛽1 + 𝛿𝛿1 )𝑥𝑥 + 𝑢𝑢.
• Notice that the dummy causes the slope to change as well, aside from the
intercept.

Not for distribution. For lecture purposes only. 11


Other interactions with dummies

Not for distribution. For lecture purposes only. 12


Exercise
• 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 = 𝜃𝜃0 + 𝛿𝛿0 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + 𝛽𝛽1 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 𝑢𝑢
• Assume 𝐸𝐸 𝑢𝑢 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓, 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 = 0
• Find the difference in the average wage between females and males given a
fixed value of education.
• 𝐸𝐸 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 1, 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 =?
• 𝐸𝐸 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 0, 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 =?

• 𝐸𝐸 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 1, 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 − 𝐸𝐸 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 0, 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 = ?

• Keeping education level constant, females earn 𝛿𝛿0 less than males on average
(if 𝛿𝛿0 < 0)
Not for distribution. For lecture purposes only. 13
Exercise
• Suppose 𝛿𝛿0 < 0; 𝛽𝛽1 , 𝛽𝛽3 > 0; 𝛽𝛽2 , 𝛽𝛽4 , 𝛽𝛽3 + 𝛽𝛽4 < 0.
The following models have different graphs:

• 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 = 𝛽𝛽0 + 𝛿𝛿0 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + 𝛽𝛽1 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 𝑢𝑢

• 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 = 𝛽𝛽0 + 𝛿𝛿0 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + 𝛽𝛽1 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 𝛽𝛽2 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 ⋅ 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 𝑢𝑢

• 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 = 𝛽𝛽0 + 𝛿𝛿0 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + 𝛽𝛽1 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 𝛽𝛽2 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 ⋅ 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 𝛽𝛽3 𝑒𝑒𝑒𝑒𝑒𝑒𝑐𝑐 2 + 𝛽𝛽4 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 ⋅ 𝑒𝑒𝑒𝑒𝑒𝑒𝑐𝑐 2 + 𝑢𝑢

Not for distribution. For lecture purposes only. 14


Exercise

• log(𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤) = 0.417 − 0.297𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + �
𝑒𝑒 log 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝐹𝐹 −0.297
0.08𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 0.29𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 − 0.0058𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑟𝑟 2 • ⇒ � = 𝑒𝑒
𝑒𝑒 log 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝑀𝑀
+0.032𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 − 0.00059𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑒𝑒 2 � 𝐹𝐹
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒
• � = 𝑒𝑒 −0.297
• Women earn ________ % _________ 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝑀𝑀
than men on average, keeping the � 𝐹𝐹
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒 �𝑀𝑀
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒 −0.297
other explanatory variables the same. • ⇒ �𝑀𝑀
− �𝑀𝑀
= 𝑒𝑒 −1
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒

• % diff. in 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤
� •
� 𝐹𝐹 −𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒 �𝑀𝑀
= −0.2570.
�𝑀𝑀
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒
≈ 100 × diff. in log �𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒 %.
Note: • ∴ % diff. in 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤
� = −25.70%
𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝐹𝐹 − log �
log � 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝑀𝑀 = −0.297 • or
� = 100 × 𝑒𝑒 −0.297 − 1 %
• For the exact answer, use the following • % diff. in 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤
as a starting point:
• (when the other 𝑥𝑥’s are the same)
� �
• 𝑒𝑒 log 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝐹𝐹 −log 𝑤𝑤𝑤𝑤𝑤𝑤𝑒𝑒𝑀𝑀 = 𝑒𝑒 −0.297
Not for distribution. For lecture purposes only. 15
Calculating the exact % difference in a model with a dummy variable

• Suppose we have this model:


• log 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 + 𝑢𝑢
• The exact % difference when 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 = 1 vs. 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 = 0
is 100 × 𝑒𝑒 𝛽𝛽2 − 1 %

• Recall: When we have a nondummy 𝑥𝑥2 instead of a dummy:


• log 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝑢𝑢,
• the exact % change in 𝑦𝑦 due to Δ𝑥𝑥2 is 100 × 𝑒𝑒 𝛽𝛽2 Δ𝑥𝑥2 − 1 %
(keeping 𝑥𝑥1 the same).

Not for distribution. For lecture purposes only. 16


Exercise
• Multiple categories
• Suppose we have 4 categories:
• 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚, 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚
• Where, for any given observation,
• 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 + 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 = 1
• Example:

• 𝑙𝑙𝑙𝑙𝑙𝑙(𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤) = 0.321 + 0.213𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 − 0.198𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 − 0.110𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 0.079𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 +
0.027𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 0.00054𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑟𝑟 2 + 0.029𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 − 0.00053𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑒𝑒 2

• The base case is?


• Given the same 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒, 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒, and 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡, on average,
• married males are expected to earn ______ _______ than single males.
• What is the average or expected difference between the wages of married women and single women?

Not for distribution. For lecture purposes only. 17


Note:
• Example:
• 𝑙𝑙𝑙𝑙𝑙𝑙�
𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 = 0.321 + 0.213𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 − 0.198𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 −
0.110𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 0.079𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 0.027𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 0.00054𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑟𝑟 2 +
0.029𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 − 0.00053𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑒𝑒 2

• An alternative model (interactions among dummy variables):



• 𝑙𝑙𝑙𝑙𝑙𝑙(𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤) = 0.321 − 0.110𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 + 0.213𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚
−0.301𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 � 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 + 0.079𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 0.027𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 + 0.00054𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑟𝑟 2
+ 0.029𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 − 0.00053𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑒𝑒 2
• We can recover the coefficients in the previous model above by setting
appropriate values of the dummies in the alternative model.

Not for distribution. For lecture purposes only. 18


Note:
• Incorporating ordinal information by using dummy variables (see
Wooldridge)

Not for distribution. For lecture purposes only. 19


Testing for differences across groups
• Can we test whether a regression function is different for one group,
e.g. male vs. female?
• Suppose we want to test if the following population regression model describes averages of 𝑦𝑦
for both males and females:
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝛽𝛽3 𝑥𝑥3 + 𝑢𝑢 (The restricted or “r” model)
• We may either conduct an F-test we studied before (using an F statistic)
or use another particular kind of F statistic called the Chow statistic.
• Using the F statistic we studied before:
• The following model allows the intercept and slopes to be different between two groups (i.e., the
group of males and the group of females):
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝛽𝛽3 𝑥𝑥3 + 𝛿𝛿0 𝑑𝑑 + 𝛿𝛿1 𝑑𝑑 ∗ 𝑥𝑥1 + 𝛿𝛿2 𝑑𝑑 ∗ 𝑥𝑥2 + 𝛿𝛿3 𝑑𝑑 ∗ 𝑥𝑥3 + 𝑢𝑢 (The “ur” model)
• 𝐻𝐻0 : 𝛿𝛿1 = 0, 𝛿𝛿2 = 0, 𝛿𝛿3 = 0, 𝛿𝛿4 = 0
(𝑆𝑆𝑆𝑆𝑅𝑅𝑟𝑟 −𝑆𝑆𝑆𝑆𝑅𝑅𝑢𝑢𝑢𝑢 )/𝑞𝑞
Conduct the 𝐹𝐹-test we encountered before using 𝐹𝐹𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ≡ ~𝐹𝐹𝑞𝑞,𝑛𝑛−𝑘𝑘−1
𝑆𝑆𝑆𝑆𝑅𝑅𝑢𝑢𝑢𝑢 /(𝑛𝑛−𝑘𝑘−1)

Not for distribution. For lecture purposes only. 20


Testing for differences across groups
• Can we test whether a regression function is different for one group,
e.g. male vs. female?
• Suppose we want to test if the following population regression model describes
averages of 𝑦𝑦 for both males and females:
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + 𝛽𝛽3 𝑥𝑥3 + 𝑢𝑢 (1)
• We may either conduct an F-test we studied before (using an F statistic)
or use another particular kind of F statistic called the Chow statistic.
• Using another particular kind of F statistic called the Chow statistic:
• Run the model (1) separately for females and males.
• Get 𝑆𝑆𝑆𝑆𝑅𝑅𝑓𝑓 and 𝑆𝑆𝑆𝑆𝑅𝑅𝑚𝑚 .
• Pool the groups together and get 𝑆𝑆𝑆𝑆𝑅𝑅𝑝𝑝
𝑆𝑆𝑆𝑆𝑅𝑅𝑝𝑝 − 𝑆𝑆𝑆𝑆𝑅𝑅𝑓𝑓 +𝑆𝑆𝑆𝑆𝑅𝑅𝑚𝑚 𝑛𝑛−2 𝑘𝑘+1
• 𝐹𝐹 = ⋅ .
𝑆𝑆𝑆𝑆𝑅𝑅𝑓𝑓 +𝑆𝑆𝑆𝑆𝑅𝑅𝑚𝑚 𝑘𝑘+1

Not for distribution. For lecture purposes only. 21


Linear probability model: dummy on the LHS
• What if the dependent variable 𝑦𝑦 is a • 𝛽𝛽𝑗𝑗 is the change in the probability of
binary variable? success when 𝑥𝑥𝑗𝑗 changes.
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + ⋯ + 𝛽𝛽𝑘𝑘 𝑥𝑥𝑘𝑘 + 𝑢𝑢, • Predicted 𝑦𝑦 is the predicted probability
1 of success.
where 𝑦𝑦 = �
0 • Problem: some of the predictions can
• We have a linear probability model. be outside [0,1].
• We can write our model as • This model will violate
homoskedasticity, which implies that 𝑡𝑡-
• 𝑃𝑃 𝑦𝑦 = 1 𝑥𝑥 = 𝐸𝐸(𝑦𝑦|𝑥𝑥)
statistics may be invalid.
• = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + 𝛽𝛽2 𝑥𝑥2 + ⋯ + 𝛽𝛽𝑘𝑘 𝑥𝑥𝑘𝑘 .
• We have better models, but this is a
• 𝑃𝑃 𝑦𝑦 = 0 𝑥𝑥 = 1 − 𝑃𝑃(𝑦𝑦 = 1|𝑥𝑥) good start.
• = 1 − 𝐸𝐸(𝑦𝑦|𝑥𝑥)

Not for distribution. For lecture purposes only. 23


Linear probability model: dummy on the LHS
• The estimated model (OLS):
• 𝑦𝑦� = 𝛽𝛽̂0 + 𝛽𝛽̂1 𝑥𝑥1 + ⋯ + 𝛽𝛽̂𝑘𝑘 𝑥𝑥𝑘𝑘
• where 𝑦𝑦� is the estimated probability of success ≡ 𝑃𝑃(𝑦𝑦�
= 1|𝐱𝐱).

Not for distribution. For lecture purposes only. 24


Linear probability model: dummy on the LHS
• Wooldridge 2012, p. 249:

Not for distribution. For lecture purposes only. 25


Digression [We skipped Wooldridge’s Chapter 5, but here are some
key notes:]
• Asymptotic properties or large sample properties:
• The distribution of 𝛽𝛽̂𝒋𝒋 becomes more and more tightly distributed around 𝛽𝛽𝑗𝑗 as
the sample size grows. (consistency)
• 𝛽𝛽̂𝒋𝒋 is approximately normally distributed in large enough sample sizes
(asymptotic normality)
• The usual 𝑡𝑡 and 𝐹𝐹 statistics have approximated 𝑡𝑡 and 𝐹𝐹 distributions when the
sample size is large enough.

Not for distribution. For lecture purposes only. 26


Illustration
• (consistency)
• Wooldridge 2012,
• P. 170

Not for distribution. For lecture purposes only. 27


Digression [Lagrange Multiplier test for a specific hypothesis]
• Assumptions needed: Gauss-Markov • Steps:
assumptions + large sample • 1. save the residuals 𝑢𝑢� from running ∗
• Consider the following MLR model:
• 2. Regress 𝑢𝑢� on all the 𝑥𝑥’s and get the 𝑅𝑅𝑢𝑢2 .
• 𝑦𝑦 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥1 + ⋯ + 𝛽𝛽𝑘𝑘 𝑥𝑥𝑘𝑘 + 𝑢𝑢 • 3. Compute 𝐿𝐿𝐿𝐿 = 𝑛𝑛𝑅𝑅𝑢𝑢2
• We would like to test: • Note: 𝐿𝐿𝐿𝐿 = 𝑛𝑛𝑅𝑅𝑢𝑢2 ~𝜒𝜒𝑞𝑞2 with a large enough
• 𝐻𝐻0 : 𝛽𝛽𝑘𝑘−𝑞𝑞+1 = 0, … , 𝛽𝛽𝑘𝑘 = 0. (i.e., 𝑞𝑞 exclusion sample size.
restrictions) • 4. Compare 𝐿𝐿𝐿𝐿 to the appropriate critical
• 𝐻𝐻1 : At least one of the 𝛽𝛽’s is ≠ 0. value, 𝑐𝑐, in a 𝜒𝜒𝑞𝑞2 distribution. If 𝐿𝐿𝐿𝐿 > 𝑐𝑐, reject
𝐻𝐻0 . (Alternatively, get the p-value as the
• The 𝐿𝐿𝐿𝐿 statistic requires estimation of the probability that a 𝜒𝜒𝑞𝑞2 random variable exceeds
restricted model only:
the value of the test statistic. If the p value <
• 𝑦𝑦 = 𝛽𝛽�0 + 𝛽𝛽�1 𝑥𝑥1 + ⋯ + 𝛽𝛽�𝑘𝑘−𝑞𝑞 𝑥𝑥𝑘𝑘−𝑞𝑞 + 𝑢𝑢� (∗) the desired 𝛼𝛼, reject 𝐻𝐻0 . Otherwise, we fail to
reject 𝐻𝐻0 .
• Do Example 5.3
in Wooldridge 2012, p. 180

Not for distribution. For lecture purposes only. 28

You might also like