Econometrics Chapter 8 PPT Slides
Econometrics Chapter 8 PPT Slides
Nonlinear
Regression
Functions
Outline
1. Nonlinear regression functions general
comments
2. Nonlinear functions of one variable
3. Nonlinear functions of two variables:
interactions
4. Application to the California Test Score
data set
8-2
8-3
8-4
8-5
8-6
8-7
2. Logarithmic transformations
Y and/or X is transformed by taking its logarithm
this gives a percentages interpretation that makes sense
in many applications
8-8
1. Polynomials in X
Approximate the population regression function by a
polynomial:
Yi = 0 + 1Xi + 2 X i2++ r X r + ui
This is just the linear multiple regression model
except that the regressors are powers of X!
Estimation, hypothesis testing, etc. proceeds as in
the multiple regression model using OLS
The coefficients are difficult to interpret, but the
regression function itself is interpretable
Copyright 2015 Pearson, Inc. All rights reserved.
8-9
8-10
Number of obs
F( 2,
417)
Prob > F
R-squared
Root MSE
=
=
=
=
=
420
428.52
0.0000
0.5562
12.724
-----------------------------------------------------------------------------|
Robust
testscr |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------avginc |
3.850995
.2680941
14.36
0.000
3.32401
4.377979
avginc2 | -.0423085
.0047803
-8.85
0.000
-.051705
-.0329119
_cons |
607.3017
2.901754
209.29
0.000
601.5978
613.0056
------------------------------------------------------------------------------
Test the null hypothesis of linearity against the alternative that the regression function is a
quadratic.
Copyright 2015 Pearson, Inc. All rights reserved.
8-11
TestScore
(0.27)
(0.0048)
8-12
TestScore
= 607.3 + 3.85Incomei 0.0423(Incomei)2
(2.9) (0.27)
(0.0048)
8-13
TestScore
= 607.3 + 3.85Incomei 0.0423(Incomei)2
Predicted effects for different values of X:
Change in Income ($1000 per capita)
TestScore
from 5 to 6
3.4
from 25 to 26
1.7
from 45 to 46
0.0
8-14
Group Activity:
Is quadratic better than linear ?
Based on what we have learned together in
this class, how would we test if
TestScore
(2.9)
(0.27)
(0.0048)
8-15
Number of obs
F( 3,
416)
Prob > F
R-squared
Root MSE
=
=
=
=
=
420
270.18
0.0000
0.5584
12.707
-----------------------------------------------------------------------------|
Robust
testscr |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------avginc |
5.018677
.7073505
7.10
0.000
3.628251
6.409104
avginc2 | -.0958052
.0289537
-3.31
0.001
-.1527191
-.0388913
avginc3 |
.0006855
.0003471
1.98
0.049
3.27e-06
.0013677
_cons |
600.079
5.102062
117.61
0.000
590.0499
610.108
------------------------------------------------------------------------------
8-16
(1)avginc2=0.0
(2)avginc3=0.0
F(2,416)=37.69
Prob>F=0.0000
8-17
Hypotheses concerning degree r can be tested by t- and Ftests on the appropriate (blocks of) variable(s).
Choice of degree r
plot the data; t- and F-tests, check sensitivity of estimated
effects; judgment.
Or use model selection criteria (later)
Copyright 2015 Pearson, Inc. All rights reserved.
8-18
Note that as a number goes from 100 to 1,000,000, its natural log goes from
4.605 to only 13.816! As a result, logs can be used in econometrics if a
researcher wants to reduce the absolute size of the numbers associated with
the same actual meaning
One useful property of natural logs in econometrics is that they make it easier
to figure out impacts in percentage terms (well see this when we get to the
7-19
double-log specification)
Copyright 2015 Pearson, Inc. All rights reserved.
ln(x+x) ln(x) =
(calculus:
Numerically:
x
ln 1
x
x
x
d ln(x) 1 )
dx
x
8-20
I.
linear-log
Yi = 0 + 1ln(Xi) + ui
II.
log-linear
ln(Yi) = 0 + 1Xi + ui
III. log-log
ln(Yi) = 0 + 1ln(Xi) + ui
8-21
ln(X + X) ln(X)
so
or
X
,X
X
X
Y
(small X)
X / X
8-22
Y
X / X
X
Now 100 X = percentage change in X
a 1% increase in X (multiplying X by 1.01) is
associated with a .011 change in Y.
(1% increase in X --> .01 increase in ln(X)
--> .011 increase in Y)
Copyright 2015 Pearson, Inc. All rights reserved.
8-23
TestScore
= 557.8 + 36.42ln(Incomei)
(3.8)
(1.40)
8-24
8-25
(b)
8-26
Log-log case
ln(Yi) = 0 + 1ln(Xi) + ui
8-27
Double-Log Form
Here, the natural log of Y is the dependent variable and the
natural log of X is the independent variable:
(7.5)
In a double-log equation, an individual regression coefficient
can be interpreted as an elasticity because:
(7.6)
Note that the elasticities of the model are constant and
the slopes are not
This is in contrast to the linear model, in which the
slopes are constant but the elasticities are not
7-28
TestScore)
ln(
= 6.336 + 0.0554ln(Incomei)
(0.006) (0.0021)
8-29
8-30
8-31
8-32
8-33
STR
X 1
8-34
8-35
HiSTR =
1 if STR 20
and HiEL =
0 if STR 20
1 if PctEL l0
0 if PctEL 10
TestScore
= 664.1 18.2HiEL 1.9HiSTR 3.5(HiSTRHiEL)
(1.4)
(2.3)
(1.9)
(3.1)
8-36
8-37
8-38
(19.5)
(0.97)
When HiEL = 0:
= 682.2 0.97STR
TestScore
When HiEL = 1,
= 682.2 0.97STR + 5.6 1.28STR
TestScore
= 687.8 2.25STR
regression lines: one for each HiSTR group.
Two
TestScore
Class size reduction is estimated to have a larger effect when
the percent of English learners is large.
8-39
8-40
TestScore
= 686.3 1.12STR 0.67PctEL + .0012(STRPctEL),
(11.8)
(0.59)
(0.37)
(0.019)
PctEL
TestScore
STR
0
20%
1.12
1.12+.001220 = 1.10
8-41
8-42