Professional Documents
Culture Documents
http://learningresources.lse.ac.uk/
Y b1 b j X j
j2
Y b1 b j X j
j2
Since, by definition, the fitted values are a linear combination of the explanatory variables,
as shown, Y^2 is a linear combination of the squares of the X variables and their interactions.
2
Y b1 b j X j
j2
^
If Y2 is added to the regression specification, it should pick up quadratic and interactive
nonlinearity, if present, without necessarily being highly correlated with any of the X
variables.
3
Y b1 b j X j
j2
If the t statistic for the coefficient of is significant, this indicates that some kind of
nonlinearity may be present.
4
Number of obs
F( 1,
538)
Prob > F
R-squared
Adj R-squared
Root MSE
=
=
=
=
=
=
540
112.15
0.0000
0.1725
0.1710
13.126
-----------------------------------------------------------------------------EARNINGS |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------S |
2.455321
.2318512
10.59
0.000
1.999876
2.910765
_cons | -13.93347
3.219851
-4.33
0.000
-20.25849
-7.608444
-----------------------------------------------------------------------------. predict FITTED
(option xb assumed; fitted values)
. gen FITTEDSQ = FITTED*FITTED
We will do this for a wage equation. Here is the output from a simple linear regression of
EARNINGS on S using EAEF Data Set 21. We save the fitted values as FITTED and generate
FITTEDSQ as the square.
5
Number of obs
F( 2,
537)
Prob > F
R-squared
Adj R-squared
Root MSE
=
=
=
=
=
=
540
59.69
0.0000
0.1819
0.1788
13.063
-----------------------------------------------------------------------------EARNINGS |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------S | -.6956444
1.290509
-0.54
0.590
-3.230709
1.83942
FITTEDSQ |
.0303508
.0122302
2.48
0.013
.006326
.0543757
_cons |
16.35854
12.62009
1.30
0.195
-8.432256
41.14933
------------------------------------------------------------------------------
The coefficient of FITTEDSQ is significant at the 5 percent level and nearly at the 1 percent
level, indicating that the addition of the square of S would improve the specification of the
model. We saw this in a previous slideshow.
6
Number of obs
F( 2,
537)
Prob > F
R-squared
Adj R-squared
Root MSE
=
=
=
=
=
=
540
59.69
0.0000
0.1819
0.1788
13.063
-----------------------------------------------------------------------------EARNINGS |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------S | -.6956444
1.290509
-0.54
0.590
-3.230709
1.83942
FITTEDSQ |
.0303508
.0122302
2.48
0.013
.006326
.0543757
_cons |
16.35854
12.62009
1.30
0.195
-8.432256
41.14933
------------------------------------------------------------------------------
However, we also saw that it was better still to use a semilogarithmic specification. The
RESET test is intended to detect nonlinearity, but not be specific about the most appropriate
nonlinear model.
7
Number of obs
F( 2,
537)
Prob > F
R-squared
Adj R-squared
Root MSE
=
=
=
=
=
=
540
59.69
0.0000
0.1819
0.1788
13.063
-----------------------------------------------------------------------------EARNINGS |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------S | -.6956444
1.290509
-0.54
0.590
-3.230709
1.83942
FITTEDSQ |
.0303508
.0122302
2.48
0.013
.006326
.0543757
_cons |
16.35854
12.62009
1.30
0.195
-8.432256
41.14933
------------------------------------------------------------------------------
It may fail to detect some types of nonlinearity. However it does have the virtues of being
very easy to implement and consuming only one degree of freedom.
8
11.07.25