* Linear regression with inequality restrictions. * Reference: Geweke, Journal of Applied Econometrics, 1986. * The data set is from Pindyck and Rubinfeld, * Econometric Models and Economic Forecasts, * 1991, Third Edition, Table 2.1, p. 43; * 1998, Fourth Edition, Table 2.1, p. 54. SAMPLE 1 32 READ RENT NO RM S DUM 230 2 2 1 7 245 2 2 0 24 190 1 1 1 0 203 4 2 0 24 450 3 2 1 4 280 2 2 1 6 310 2 2 0 8 185 2 1 0 8 218 2 2 0 42 185 1 1 1 8 340 2 2 1 3 230 2 2 0 60 245 1 1 1 24 200 2 2 0 36 125 1 1 0 3 300 3 3 0 9 350 2 2 0 16 100 1 1 0 5 280 2 2 1 6 175 2 1 0 4 310 2 2 0 10 450 3 2 0 5 160 2 1 0 12 285 1 1 0 4 255 2 2 0 8 340 4 2 0 3 300 2 2 0 11 880 6 6 1 6 800 5 5 1 10 450 3 3 0 5 630 6 6 0 24 480 3 3 0 24 GENR Y=RENT/NO GENR R=RM/NO GENR SR=S*R GENR OSR=(1-S)*R GENR SD=S*DUM GENR OSD=(1-S)*DUM * Estimation by OLS - results from column 1 of Geweke's Table ii. OLS Y SR OSR SD OSD * Now use Geweke's method to impose inequality restrictions. * Use 1000 antithetic pairs (2000 replications). * This gives results similar to column 3 of Geweke's table ii. * Since random numbers are used, different results will be obtained * in different runs and on different computers. SET CPUTIME BAYES / NSAMP=1000 RESTRICT SR.GT.0 RESTRICT OSR.GT.0 RESTRICT SD.LT.0 RESTRICT OSD.LT.0 END DISPLAY CPUTIME * Now attempt to impose the restrictions directly using the trick * of squaring a coefficient to force it positive. This requires * nonlinear estimation. * This gives results similar to column 2 of Geweke's table ii. SET CPUTIME NL 1 / NC=5 PITER=50 EQ Y = A + (B**2)*SR + (C**2)*OSR - (D**2)*SD - (E**2)*OSD END DISPLAY CPUTIME * The estimated coefficients are found by squaring each * of the parameters. * TEST commands can be used to obtain the coefficients and standard errors * in the output labeled "TEST VALUE" and "STD. ERROR OF TEST VALUE". * Be careful when using these standard errors. For details * see Lafontaine and White, "Obtaining Any Wald Statistic * You Want", Economics Letters, 1986. TEST B**2 TEST C**2 TEST -(D**2) TEST -(E**2) STOP