* W.H. Greene, Econometric Analysis, Fourth Edition, 2000.
SAMPLE 1 36
* Table A7.2
READ (USdata.shd) / NAMES
* Chapter 7
* Example 7.14, pp. 298-299.
GENR C1=LAG(C)
SAMPLE 2 36
OLS C Y C1
* Calculate the long-run MPC
TEST Y/(1-C1)
* Test the null hypothesis that the long-run MPC is greater than or
* equal to one.
* (The TEST command reports p-values for two-sided tests).
TEST Y/(1-C1)=1
* The t-test statistic is available in the temporary variable $T
GEN1 z=$T
* Now get a p-value for a one-sided test (the alternative is that
* the long-run MPC is less than one) based on the standard
* normal distribution
DISTRIB z
GEN1 p_value=$cdf
PRINT z p_value
* Example 7.15 - The J Test
GENR Y1=LAG(Y)
* Estimate the competing models
OLS C Y Y1 / PREDICT=YHAT1
OLS C Y C1 / PREDICT=YHAT2
* The test statistic is the t-ratio on YHAT2
OLS C Y Y1 YHAT2
* Reverse situation
OLS C Y C1 YHAT1
* Errata for the Greene textbook lists the following for p. 303:
* In Example 7.15, the values given, 2.544, 4.28, -19.24, -3.25,
* should be 2.58, 4.30, -21.25, -3.29, respectively.
STOP