* Reference: Chapter 6 of * Ernst R. Berndt, The Practice of Econometrics, Addison-Wesley, 1991. TIME 1952 4 SAMPLE 1952.1 1986.4 READ (KOPCKE) YEAR JE JS F IS IE KELAG KSLAG Y / SKIPLINES=1 READ (KOPCKE) YR1 U Q CS CE / SKIPLINES=2 NOREWIND * Data Check IF (YEAR.NE.YR1) STOP * Exercise 1, p. 279 * (a) Summary statistics STAT IE IS KELAG KSLAG JE JS F Q U CE CS * (b) Ratio of investment in equipment to investment in structures. GENR R1=IE/IS * Ratio for capital stocks GENR R2=KELAG/KSLAG GRAPH R1 R2 / TIME LINEONLY * Exercise 2, p. 281 * (a) & (b) SAMPLE 1956.1 1986.4 GENR YLAG=LAG(Y) GENR IELAG=LAG(IE) * Estimate Equation (6.14) for investment in equipment. * The DLAG option reports Durbin's h test assuming that the first * regressor is a lagged dependent variable. OLS IE IELAG Y YLAG / DLAG RESID=E * Estimate the partial adjustment coefficient (lambda) - reported as * TEST VALUE on the TEST command. On the TEST command the variable * names represent coefficients. TEST 1-IELAG * Estimate the capital/output coefficient (mu). TEST Y/(1-IELAG) * Estimate the rate of depreciation (delta) TEST 1+YLAG/Y * Durbin's m test for autocorrelation. * Run an artifical regression. SAMPLE 1956.2 1986.4 GENR ELAG=LAG(E) OLS E IELAG Y YLAG ELAG * Calculate a test statistic GEN1 LM=$N*$R2 * Get a p-value DISTRIB LM / TYPE=CHI DF=1 GEN1 pval=1-$CDF PRINT LM pval * Exercise 3, p. 283. * (a) & (b) Estimate the Autoregressive Model * Initialize variables. SAMPLE 1952.1 1986.4 GENR E=0 GENR EP=0 * Equation (6.41) and Table 6.7 SAMPLE 1956.1 1979.4 SET NODELETE OLS IE IE(1.8) / RESID=E RSTAT * Calculate the RMSE - Equation (6.50) GENR EP=(E/IE)**2 STAT EP / DN MEAN=MU GEN1 RMSE=100*SQRT(MU) PRINT RMSE * Now try a different sample period. SAMPLE 1956.1 1986.4 OLS IE IE(1.8) / RESID=E RSTAT GENR EP=(E/IE)**2 STAT EP / DN MEAN=MU GEN1 RMSE=100*SQRT(MU) PRINT RMSE * Exercise 4, p. 284. * (a) Generate FJE for the whole sample first SAMPLE 1952.1 1986.4 GENR FJE=F/JE * Now estimate a Cash Flow Model like that in Table 6.3 * Omit the lagged capital stock as a regressor. That is, the * parameter c in Equation (6.18) is constrained to zero. * Note that answers will be different from Table 6.3. SAMPLE 1956.1 1979.4 SET NODELETE OLS IE FJE(0.5,3) / RSTAT * Estimate the model allowing for first-order autocorrelation. AUTO IE FJE(0.5,3) * Exercise 5, p. 286. * (a) Generate variables SAMPLE 1952.1 1986.4 GENR PCY=(1/CE)*Y GENR LAGY=LAG(Y) GENR PCLY=(1/CE)*LAGY * (b) Estimate the Neoclassical model similar to Table 6.4 SAMPLE 1956.1 1979.4 SET NODELETE OLS IE PCY(0.12,3) PCLY(0.12,3) KELAG / RSTAT * Allow for first-order autocorrelation. AUTO IE PCY(0.12,3) PCLY(0.12,3) KELAG * Exercise 6, p. 287. * (a) Generate a new variable SAMPLE 1952.1 1986.4 GENR Q1KE=(Q-1)*KELAG * (b) Now estimate the Tobin's Q Model as described in Equation (6.39) * and similar to Table 6.6 SAMPLE 1956.1 1979.4 SET NODELETE OLS IE Q1KE(0.8,3) KELAG / RSTAT AUTO IE Q1KE(0.8,3) KELAG * (c) Try it with a Tail Constraint OLS IE Q1KE(0.8,3,2) KELAG / RSTAT AUTO IE Q1KE(0.8,3,2) KELAG * Exercise 7, p. 289. * (a) & (b) Identification SAMPLE 1956.1 1979.4 ARIMA IE / GRAPHDATA GRAPHAC NLAG=16 * Now check the autocorrelation function for the first-differenced data. ARIMA IE / GRAPHAC NDIFF=1 NLAG=16 * Try log-transformed data ARIMA IE / GRAPHDATA GRAPHAC NLAG=16 LOG ARIMA IE / GRAPHAC NDIFF=1 NLAG=16 LOG * (c) Estimation - estimate alternative models and select the * model that minimizes the AIC or SC measures. * An ARIMA(1,1,1) model with log transformed data. ARIMA IE / NAR=1 NMA=1 NDIFF=1 LOG COEF=COY GEN1 SIG=SQRT($SIG2) * An autoregressive model for the first-differenced log transformed * data. ARIMA IE / NAR=6 NDIFF=1 LOG * Forecasting SAMPLE 1956.1 1986.4 ARIMA IE / NAR=1 NMA=1 NDIFF=1 LOG COEF=COY GRAPHFORC & SIGMA=SIG FBEG=1978.1 FEND=1986.4 * Exercise 8, p. 291. * (a) Estimate the accelerator equation (6.15) and Table 6.2. SAMPLE 1956.1 1986.4 SET NODELETE OLS IE Y(0.6,3) KELAG / RSTAT * Allow for first-order autocorrelation AUTO IE Y(0.6,3) KELAG STOP