* Reference: Chapter 4 of * Ernst R. Berndt, The Practice of Econometrics, Addison-Wesley, 1991. SAMPLE 1 200 READ (WAUGH) GREEN NOSTALK DISPERSE PRICE / SKIPLINES=1 * Exercise 1, p. 132 * (a) Compare with the estimation results in Equation (4.3), p. 107 GEN1 AVG=2.782 OLS PRICE GREEN NOSTALK DISPERSE * (d) Find the effects of one-unit changes in the regressors on the * absolute price per bunch of asparagus. On the TEST command * a variable name represents the coefficient. TEST AVG*GREEN TEST AVG*NOSTALK TEST AVG*DISPERSE * (b) & (c) STAT PRICE GREEN NOSTALK DISPERSE / PCOV PCOR * Exercise 2, p. 134 * (b) OLS PRICE GREEN GEN1 COR1=SQRT($R2) OLS PRICE NOSTALK GEN1 COR2=SQRT($R2) OLS PRICE DISPERSE GEN1 COR3=SQRT($R2) PRINT COR1 COR2 COR3 * Reverse regressions OLS GREEN PRICE OLS NOSTALK PRICE OLS DISPERSE PRICE * Exercise 7 (a), p. 142. * Exclude the observations where DISPERSE is 0. SKIPIF (DISPERSE.LE.0) * Linear model OLS PRICE GREEN NOSTALK DISPERSE GEN1 LLF0=$LLF * Box-Cox estimation * The ALL option uses the same transformation for all variables. * The dummy variables are untransformed. BOX PRICE GREEN NOSTALK DISPERSE / DN ALL * Likelihood ratio test - null hypothesis is the linear model. GEN1 LR=2*($LLF-LLF0) * p-value DISTRIB LR / TYPE=CHI DF=1 GEN1 pval=1-$CDF PRINT LR pval STOP