* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Chapter 6.2 Restricted Least Squares READ (beer.dat) / names * Summary statistics STAT / ALL * Transform the data to logarithms GENR LQ=LOG(Q) GENR LPB=LOG(PB) GENR LPL=LOG(PL) GENR LPR=LOG(PR) GENR LM=LOG(M) * Estimate a log-log demand function. Use the RESTRICT option to * impose the restriction of no "money illusion". OLS LQ LPB LPL LPR LM / LOGLOG RESTRICT RESTRICT LPR+LPB+LPL+LM=0 END * Now try the alternative estimation method by substituting the * restrictions directly into the equation (Equation 6.19, p. 232). GENR LP1=LOG(PB/PR) GENR LP2=LOG(PL/PR) GENR L3=LOG(M/PR) OLS LQ LP1 LP2 L3 / LOGLOG * Recover the coefficient estimate on ln(Pr) TEST -LP1-LP2-L3 STOP