Lecture 3 - Functional Forms
Lecture 3 - Functional Forms
FORMS AND
QUALITATIVE
REGRESSORS
Nguyen Quang
[email protected]
OUTLINE
• Dummy variables
• Categorical variables
• Functional forms
• Linear
• Log-linear
• Log-lin
• Lin-log
• Quadratic functional form
• Interaction terms
DATA
Viet Nam Provincial data (58 provinces, 5 years, with some missing values)
• gdp: provincial GDP (bil. VND)
• labfo: number of laborers of provinces (1000 persons)
• rinvest: gross investment of provinces (bil. VND)
• year: 2007 – 2011
• city_ucg: 1 = city under the central government; 0 = province
• zone: economic zone (NMA – Northern mountainous area; RRD – Red River
Delta; NCC – North Central and Central Coast; CHL – Central Highlands; SE -
Southeast; MRD – Mekong River Delta)
File: fnf.xlsx
DATA IMPORT
• Consider a linear regression function
𝑌 = 𝛽! + 𝛽"𝑋 + 𝜀
• Log-linear
• Log-lin
• Lin-log
FUNCTIONAL FORMS
Linear Log-linear
𝑌 = 𝛽! + 𝛽" 𝑋 + 𝜀 ln 𝑌 = 𝛽! + 𝛽" ln 𝑋 + 𝜀
Lin-log Log-lin
𝑌 = 𝛽! + 𝛽" ln 𝑋 + 𝜀 ln 𝑌 = 𝛽! + 𝛽" 𝑋 + 𝜀
VIET NAM PROVINCIAL DATA DESCRIPTION
*nma, ncc, chl, se and mrd are dummies for the zone categorical variable
DATA DESCRIPTION
DATA DESCRIPTION
EXPLAINING THE LINEAR MODEL
• Consider a linear regression function
𝑌 = 𝛽! + 𝛽"𝑋 + 𝜀
#
• Elasticity: 𝛽"
$
#
• When 𝑋 increase by 1%, 𝑌 changes by 𝛽" percent.
$
can be transformed into a linear model by taking natural logs of both sides:
ln 𝑄% = ln 𝛽" + 𝛽' ln 𝐿% + 𝛽( ln 𝐾%
$ $
• Slope (marginal effect): 𝛽" à When 𝑋 increases by 1 unit, 𝑌 changes by 𝛽" .
# #
• Elasticity:
• Approximation: When 𝑋 increase by 1%, 𝑌 changes by 𝜷𝟏 percent.
can be transformed into a linear regression by taking natural logs of both sides:
ln 𝑅𝐺𝐷𝑃+ = ln 𝑅𝐺𝐷𝑃! + 𝑡 ln(1 + 𝑟)
• Let 𝛽! = ln 𝑅𝐺𝐷𝑃! and 𝛽" = ln(1 + 𝑟), this can be rewritten as:
ln 𝑅𝐺𝐷𝑃+ = 𝛽! + 𝛽"𝑡
EXPLAINING THE LOG-LIN MODEL
• The model:
ln 𝑌 = 𝛽! + 𝛽"𝑋 + 𝜀
• Slope (marginal effect): 𝛽"𝑌 à When 𝑋 increases by 1 unit, 𝑌 changes by 𝛽"𝑌.
• The marginal effect in a log-linear model depends on the current value of 𝑌.
• Elasticity: 𝛽"𝑋 à When 𝑋 increase by 1%, 𝑌 changes by 𝛽"𝑋 percent.
• The elasticity in a log-linear model depends on the current value of 𝑋.
• The meaning of 𝜷𝟏 :
• Approximation: When X increase by 1 unit, Y changes by 𝜷𝟏 ∗ 𝟏𝟎𝟎 percent
• Exact calculation: When X increase by 1 unit, Y changes by (𝐞𝛃𝟏 − 𝟏) ∗ 𝟏𝟎𝟎 percent
LOG-LIN
MODEL
• Take 𝛽34)5 for an example:
• Approximation: Real GDP
increases by 8.17% per year.
• Exact calculation: Real GDP
increases by 𝒆𝟎.𝟎𝟖𝟏𝟕 − 𝟏 ∗
𝟏𝟎𝟎 = 𝟖. 𝟓𝟏% per year
• What about the case of dummies and
categorical variables?
THE LIN-LOG MODEL
• The model:
𝑌 = 𝛽! + 𝛽" ln 𝑋 + 𝜀
" "
• Slope (marginal effect): 𝛽" # à When 𝑋 increases by 1 unit, 𝑌 changes by 𝛽" #.
• The marginal effect in a log-linear model depends on the current value of 𝑋.
" "
• Elasticity: 𝛽" $ à When 𝑋 increase by 1%, 𝑌 changes by 𝛽" $ percent.
• The elasticity in a log-linear model depends on the current value of 𝑌.
• The meaning of 𝜷𝟏 :
• Approximation: If X increases by 1%, Y increases by 𝜷𝟏 /𝟏𝟎𝟎 units.
• The coefficient of
𝑒𝑑𝑢: 𝑤ℎ𝑖𝑡𝑒 indicates the
difference in the impact of
the number of schooling
years on wages between
white people and those
from the ‘others’ group.
• t-test of 𝑒𝑑𝑢: 𝑤ℎ𝑖𝑡𝑒
determines whether the
difference is significant.