Chapter 11 - Examples
------------------------------------------------------------------------------------------
name: SN
log: ~Wooldridge\intro-econx\iexample11.smcl
log type: smcl
opened on: 15 Jan 2019, 11:10:19
. **********************************************
. * Solomon Negash - Replicating Examples
. * Wooldridge (2016). Introductory Econometrics: A Modern Approach. 6th ed.
. * STATA Program, version 15.1.
. * Chapter 11 Further Issues in Using OLS with Time Series Data
. * Computer Exercises (Examples)
. ******************** SETUP *********************
. *Example 11.1. Static Model
. //NA
. *Example 11.2. Finite Distributed Lag Model
. //NA
. *Example 11.3. AR(1) Model
. //NA
. *Example 11.4. Efficient Markets Hypothesis
. u nyse, clear
. reg return return_1
Source | SS df MS Number of obs = 689
-------------+---------------------------------- F(1, 687) = 2.40
Model | 10.6866231 1 10.6866231 Prob > F = 0.1218
Residual | 3059.73817 687 4.45376735 R-squared = 0.0035
-------------+---------------------------------- Adj R-squared = 0.0020
Total | 3070.42479 688 4.46282673 Root MSE = 2.1104
------------------------------------------------------------------------------
return | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
return_1 | .0588984 .0380231 1.55 0.122 -.0157569 .1335538
_cons | .179634 .0807419 2.22 0.026 .0211034 .3381646
------------------------------------------------------------------------------
. //Equation [11.18]
. g return_2 = return[_n-2]
(3 missing values generated)
. reg return return_1 return_2
Source | SS df MS Number of obs = 688
-------------+---------------------------------- F(2, 685) = 1.66
Model | 14.7922358 2 7.39611792 Prob > F = 0.1912
Residual | 3054.64167 685 4.4593309 R-squared = 0.0048
-------------+---------------------------------- Adj R-squared = 0.0019
Total | 3069.4339 687 4.4678805 Root MSE = 2.1117
------------------------------------------------------------------------------
return | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
return_1 | .0603152 .0381775 1.58 0.115 -.0146437 .1352741
return_2 | -.0380748 .0381425 -1.00 0.319 -.1129651 .0368154
_cons | .1857481 .0811501 2.29 0.022 .0264153 .3450808
------------------------------------------------------------------------------
. test return_1 return_2
( 1) return_1 = 0
( 2) return_2 = 0
F( 2, 685) = 1.66
Prob > F = 0.1912
. *Example 11.5. Expectations Augmented Phillips Curve
. u phillips, clear
. d
Contains data from phillips.dta
obs: 49
vars: 11 17 Aug 1999 21:42
size: 2,058
------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
------------------------------------------------------------------------------------------
year int %9.0g 1948-1996
unem float %9.0g civilian unem. rate
inf float %9.0g CPI inflation rate
unem_1 float %9.0g unem lagged once
inf_1 float %9.0g inf lagged once
unem_2 float %9.0g unem lagged twice
inf_2 float %9.0g inf lagged twice
cunem float %9.0g unem - unem_1
cinf float %9.0g inf - inf_1
cunem_1 float %9.0g cunem lagged once
cinf_1 float %9.0g cinf lagged once
------------------------------------------------------------------------------------------
Sorted by:
. reg cinf unem
Source | SS df MS Number of obs = 48
-------------+---------------------------------- F(1, 46) = 5.56
Model | 33.3830007 1 33.3830007 Prob > F = 0.0227
Residual | 276.305134 46 6.00663335 R-squared = 0.1078
-------------+---------------------------------- Adj R-squared = 0.0884
Total | 309.688135 47 6.58910925 Root MSE = 2.4508
------------------------------------------------------------------------------
cinf | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unem | -.5425869 .2301559 -2.36 0.023 -1.005867 -.079307
_cons | 3.030581 1.37681 2.20 0.033 .2592061 5.801955
------------------------------------------------------------------------------
. display as text "u_0 = " _b[_cons]/-_b[unem]
u_0 = 5.5854288
. *Example 11.6. Fertility Equation
. u fertil3, clear
. reg cgfr cpe cpe_1 cpe_2
Source | SS df MS Number of obs = 69
-------------+---------------------------------- F(3, 65) = 6.56
Model | 293.259859 3 97.7532864 Prob > F = 0.0006
Residual | 968.199959 65 14.895384 R-squared = 0.2325
-------------+---------------------------------- Adj R-squared = 0.1971
Total | 1261.45982 68 18.5508797 Root MSE = 3.8595
------------------------------------------------------------------------------
cgfr | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cpe | -.0362021 .0267737 -1.35 0.181 -.089673 .0172687
cpe_1 | -.0139706 .0275539 -0.51 0.614 -.0689997 .0410584
cpe_2 | .1099896 .0268797 4.09 0.000 .0563071 .1636721
_cons | -.9636787 .4677599 -2.06 0.043 -1.89786 -.0294976
------------------------------------------------------------------------------
. test cpe cpe_1
( 1) cpe = 0
( 2) cpe_1 = 0
F( 2, 65) = 1.29
Prob > F = 0.2824
. *Example 11.7. Wages and Productivity
. u earns, clear
. reg lhrwage loutphr t
Source | SS df MS Number of obs = 41
-------------+---------------------------------- F(2, 38) = 641.22
Model | 1.04458064 2 .522290318 Prob > F = 0.0000
Residual | .030951776 38 .00081452 R-squared = 0.9712
-------------+---------------------------------- Adj R-squared = 0.9697
Total | 1.07553241 40 .02688831 Root MSE = .02854
------------------------------------------------------------------------------
lhrwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
loutphr | 1.639639 .0933471 17.56 0.000 1.450668 1.828611
t | -.01823 .0017482 -10.43 0.000 -.021769 -.0146909
_cons | -5.328454 .3744492 -14.23 0.000 -6.086487 -4.570421
------------------------------------------------------------------------------
. reg ghrwage goutphr
Source | SS df MS Number of obs = 40
-------------+---------------------------------- F(1, 38) = 21.77
Model | .006255013 1 .006255013 Prob > F = 0.0000
Residual | .01091799 38 .000287316 R-squared = 0.3642
-------------+---------------------------------- Adj R-squared = 0.3475
Total | .017173003 39 .000440333 Root MSE = .01695
------------------------------------------------------------------------------
ghrwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
goutphr | .809316 .1734537 4.67 0.000 .4581773 1.160455
_cons | -.0036621 .00422 -0.87 0.391 -.0122051 .0048808
------------------------------------------------------------------------------
. *Example 11.8. Fertility Equation
. u fertil3, clear
. reg cgfr cgfr_1 cpe cpe_1 cpe_2
Source | SS df MS Number of obs = 69
-------------+---------------------------------- F(4, 64) = 7.46
Model | 401.286162 4 100.32154 Prob > F = 0.0001
Residual | 860.173657 64 13.4402134 R-squared = 0.3181
-------------+---------------------------------- Adj R-squared = 0.2755
Total | 1261.45982 68 18.5508797 Root MSE = 3.6661
------------------------------------------------------------------------------
cgfr | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cgfr_1 | .3002422 .1059034 2.84 0.006 .0886758 .5118086
cpe | -.0454721 .0256417 -1.77 0.081 -.0966972 .005753
cpe_1 | .002064 .0267776 0.08 0.939 -.0514303 .0555584
cpe_2 | .1051346 .0255904 4.11 0.000 .054012 .1562572
_cons | -.7021594 .4537988 -1.55 0.127 -1.608727 .2044079
------------------------------------------------------------------------------
. test cpe cpe_1
( 1) cpe = 0
( 2) cpe_1 = 0
F( 2, 64) = 1.66
Prob > F = 0.1990
------------------------------------------------------------------------------------------
. log close
name: SN
log: ~Wooldridge\intro-econx\iexample11.smcl
log type: smcl
closed on: 15 Jan 2019, 11:10:19
------------------------------------------------------------------------------------------