Professional Documents
Culture Documents
Lecture 6
Variable Mean S.D. Median Min. Max. 25th Per. 75th Per.
Cantril Ladder 5.41 1.13 5.43 2.89 7.66 4.52 6.12
GDP per capita 18,950 18,521 13,178 760 94,774 4,731 27,453
Ln(GDP per capita) 9.28 1.19 9.49 6.63 11.46 8.46 10.22
“GDP per capita is in terms of Purchasing Power Parity (PPP) adjusted to constant 2011
international dollars, taken from the World Development Indicators (WDI) released by
the World Bank in August 2016.” p. 17 of 2017 WHR 5
What to Log?
• Given a curved relationship, how do we know
whether to take the natural log of x, the
natural log of y, or the natural log of both?
– A quick rule of thumb: apply the natural log to the
positively skewed variable
– You can think about which variable would have
diminishing returns (applying the natural log to it)
– Of course, there’s always trial-by-error, so long as
you know how to use software
y1
40 40
20 20
0 0
0 1 2 3 4 5 -6 -4 -2 0 2
x1 ln(x1)
4 4
2 2
ln(y1)
ln(y1)
0 0
-2 -2
0 1 2 3 4 5 -6 -4 -2 0 2
x1 ln(x1)
6 6
4 4
y2
y2
2 CASE 2: How to 2
straighten? Let’s try
0
everything. 0
0 2 4 6 8 0 .5 1 1.5 2
x2 ln(x2)
2 2
1.5 1.5
ln(y2)
ln(y2)
1 1
.5 .5
0 0
0 2 4 6 8 0 .5 1 1.5 2
x2 ln(x2)
15 everything. 15
y3
y3
10 10
5 5
0 0
0 5 10 15 20 0 1 2 3
x3 ln(x3)
4 4
2 2
ln(y3)
ln(y3)
0 0
-2 -2
-4 -4
0 5 10 15 20 0 1 2 3
x3 ln(x3)
Functional Form
• Some common functional forms in economics:
– Linear: 𝑌 = 𝑎 + 𝑏𝑋
– Log-log (constant elasticity): ln 𝑌 = 𝑎 + 𝑏 ln(𝑋)
– Semi-log (log-lin): ln 𝑌 = 𝑎 + 𝑏𝑋
– Lin-log: 𝑌 = 𝑎 + 𝑏 ln(𝑋)
• Next, review first two in a demand context
and then summarize all four
• “Logarithms in Regression Analysis with Asiaphoria”
10
Demand Specifications
𝑃 Demand Demand unit
• Linear specifications elastic: elastic: 𝜀 = −1
𝑎 𝜀 < −1
of demand: Demand
𝑎
𝑄= − 𝑃 inelastic:
2 𝜀 > −1
– Graph: 𝑃 = 𝑎 − 𝑏𝑄
0 𝑎 𝑎 𝑄
– Elasticity: 𝜀 = −
𝑃 2𝑏 𝑏
• Constant elasticity
function form: Elasticity is same all
ln 𝑄 = 𝑎 − 𝑏 ln(𝑃) along demand curve
– Elasticity 𝜀 = −𝑏
𝑄 12
2 4 6 8 10
exp(ln 𝑄 ) = exp 𝑎 − 𝑏 ln 𝑃
P
𝑄 = exp 𝑎 exp −𝑏 ln 𝑃
𝑄 = exp 𝑎 exp ln 𝑃
0 20 40 60 80 100
𝑄=𝑒 𝑃 Q
% ∗
𝑒𝑙𝑎𝑠𝑡𝑖𝑐𝑖𝑡𝑦 = = =
% ∗
𝑒𝑙𝑎𝑠𝑡𝑖𝑐𝑖𝑡𝑦 = = 𝑒 −𝑏 𝑃 = −𝑏
13
7 Do these
data have
6
summary
5 values
4 (Section
3
19.4)?
6 8 10 12
ln(GDP per capita)
For countries with GDP per capita that is 10% higher, we observe
mean happiness, which is measured on a 10-point Cantril ladder
scale, that is approximately 0.08 points higher on average. 15
400
300
200
Fannie Mae, J.P. Morgan
100 Chase, Bank of America,
0 Freddie Mac, Citigroup,
0 1000 2000 3000
Assets ($b) Wells Fargo
Fortune 500 Companies, 2013
Y-hat = 16.1 + 0.1X, R2 = 0.17
250
Chevron
Revenues ($b)
200
150 Goldman Sachs, MetLife,
100 Morgan Stanley, Prudential
50 Financial, GE, AIG, TIAA-CREF,
0 Berkshire Hathaway
0 200 400 600 800 1000
Assets ($b)
http://money.cnn.com/magazines/fortune/fortune500/2013/full_list/ 16
100
residual
50
-50
0 20 40 60 80
Y-hat
17
400 5
300 4
200 3
100 2
0 1
0 1000 2000 3000 -2 0 2 4 6 8
Assets ($b) Ln Assets ($b)
Fortune 500 Companies, FAKE DATA Fortune 500 Companies, FAKE DATA
Y-hat = 16.6 + 0.1X, R2 = 0.22 Y-hat = 1.4 + 0.4X, R2 = 0.42
250 6 How to
Ln Revenues ($b)
Revenues ($b)
200
4 interpret
150
100
1.4?
2
50
0 0
0 500 1000 1500 -2 0 2 4 6 8
Assets ($b) Ln Assets ($b)
19
10000
9
8000
8.5
6000 8
4000 7.5
2000 7
1980 1987 1994 2001 2008 2014 1980 1987 1994 2001 2008 2014
Year Year
2600 7.9
2400 7.8
2200 7.7
2000 7.6
1800 7.5
1600 7.4
2000 2002 2004 2006 2008 2010 2000 2002 2004 2006 2008 2010
Year Year
21
22
ln(Real GDP/capita)
ln(Real GDP/capita)
7.3 7.8
7.7
7.2
7.6
7.1 7.5
7.4
7 7.3
1970 1972 1974 1976 1978 1980 1980 1982 1984 1986 1988 1990
Year Year
ln(Real GDP/capita)
8.4 9.2
8.2 9
8 8.8
7.8 8.6
8.4
7.6
1990 1992 1994 1996 1998 2000 2000 2002 2004 2006 2008 2010
Year Year
25
8
happiness in non-
7
OECD countries is
6 only 5 on the Cantril
5 Ladder, which is on a
4
10-point scale.
3
Interpret 1.650? (Are
these observational or
0 .2 .4 .6 .8 1
OECD (=1 if OECD member, =0 otherwise) experimental data?)
7 7
6 6
5 5
4 4
3 3
0 .2 .4 .6 .8 1 0 .2 .4 .6 .8 1
OECD (=1 if OECD member, =0 otherwise) non-OECD (=1 if non-OECD member, =0 otherwise)
27
reply)
8 8
2 2
ln(Cantril Ladder)
Ladder)
7 7
1.8 1.8
Ladder (mean
6 1.6 61.6
ln(Cantril
5 1.4 51.4
4 1.2 41.2
Cantril
3 1 3 1
0 .2 .4 .6 .8 1 0 .2 .4 .6 .8 1
0 .2 .4 OECD
.6 .8 1 0 .2 non-OECD
.4 .6
(nOECD) .8 1
OECD (=1 if OECD member, =0 otherwise) non-OECD (=1 if non-OECD member, =0 otherwise)
29